Skip to content

Commit 37e6dd3

Browse files
committed
fix git auth validation result and callback
1 parent f255f37 commit 37e6dd3

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

site/src/pages/CreateWorkspacePage/CreateWorkspacePageView.tsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -242,7 +242,8 @@ const useGitAuthVerification = (gitAuth: TypesGen.TemplateVersionGitAuth[]) => {
242242
}
243243

244244
setGitAuthErrors(errors)
245-
return Object.keys(errors).length > 0
245+
const isValid = Object.keys(errors).length === 0
246+
return isValid
246247
}
247248

248249
return {

site/src/xServices/createWorkspace/createWorkspaceXService.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -120,7 +120,7 @@ export const createWorkspaceMachine =
120120
const channel = watchGitAuthRefresh(() => {
121121
callback("REFRESH_GITAUTH")
122122
})
123-
return channel.close
123+
return () => channel.close()
124124
},
125125
},
126126
],

0 commit comments

Comments
 (0)