8000 chore: update for PR review · coder/coder@03e6df3 · GitHub
[go: up one dir, main page]

Skip to content

Commit 03e6df3

Browse files
committed
chore: update for PR review
1 parent f6ac668 commit 03e6df3

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

site/src/pages/CreateWorkspacePage/CreateWorkspaceExperimentRouter.tsx

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -44,12 +44,12 @@ const CreateWorkspaceExperimentRouter: FC = () => {
4444
});
4545

4646
if (dynamicParametersEnabled) {
47-
if (optOutQuery.isLoading) {
48-
return <Loader />;
49-
}
5047
if (optOutQuery.isError) {
5148
return <ErrorAlert error={optOutQuery.error} />;
5249
}
50+
if (!optOutQuery.data) {
51+
return <Loader />;
52+
}
5353

5454
const toggleOptedOut = () => {
5555
const key = optOutKey(optOutQuery.data?.templateId ?? "");
@@ -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