8000 fix: flashing error dialog in create workspace page · coder/coder@f6ac668 · GitHub
[go: up one dir, main page]

Skip to content
8000

Commit f6ac668

Browse files
committed
fix: flashing error dialog in create workspace page
1 parent 1e407fb commit f6ac668

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

site/src/pages/CreateWorkspacePage/CreateWorkspaceExperimentRouter.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ const CreateWorkspaceExperimentRouter: FC = () => {
4747
if (optOutQuery.isLoading) {
4848
return <Loader />;
4949
}
50-
if (!optOutQuery.data) {
50+
if (optOutQuery.isError) {
5151
return <ErrorAlert error={optOutQuery.error} />;
5252
}
5353

@@ -64,7 +64,7 @@ const CreateWorkspaceExperimentRouter: FC = () => {
6464
};
6565
return (
6666
<ExperimentalFormContext.Provider value={{ toggleOptedOut }}>
67-
{optOutQuery.data.optedOut ? (
67+
{optOutQuery.data?.optedOut ? (
6868
<CreateWorkspacePage />
6969
) : (
7070
<CreateWorkspacePageExperimental />

0 commit comments

Comments
 (0)
0