Skip to content

Commit 3502a22

Browse files
committed
Fix WorkspacePage tests
1 parent 71c6369 commit 3502a22

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

site/src/api/queries/workspaces.ts

+4-1
Original file line numberDiff line numberDiff line change
@@ -277,7 +277,10 @@ const updateWorkspaceBuild = async (
277277
build.workspace_owner_name,
278278
build.workspace_name,
279279
);
280-
const previousData = queryClient.getQueryData(workspaceKey) as Workspace;
280+
const previousData = queryClient.getQueryData<Workspace>(workspaceKey);
281+
if (!previousData) {
282+
return;
283+
}
281284

282285
// Check if the build returned is newer than the previous build that could be
283286
// updated from web socket

0 commit comments

Comments
 (0)