diff --git a/packages/dashboard-frontend/src/services/oauth/index.ts b/packages/dashboard-frontend/src/services/oauth/index.ts index 7b99ee46e..f0a923680 100644 --- a/packages/dashboard-frontend/src/services/oauth/index.ts +++ b/packages/dashboard-frontend/src/services/oauth/index.ts @@ -34,7 +34,7 @@ export class OAuthService { project = project || workspace.spec.template.dependentProjects?.find(project => !!project.git); try { - if (project) { + if (project?.git?.remotes?.origin) { await refreshFactoryOauthToken(project.git!.remotes.origin); } } catch (e) {