Skip to content

Commit 3fdfd12

Browse files
authored
[dashboard] Potential fix for "lost workspace updates" in StartWorkspace.tsx introduced in #20095 (#20189)
It's unclear as to if that's a real bug, fixing it here is good anyway.
1 parent 5f7eb1c commit 3fdfd12

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

components/dashboard/src/start/StartWorkspace.tsx

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -144,6 +144,11 @@ export default class StartWorkspace extends React.Component<StartWorkspaceProps,
144144
await this.onWorkspaceUpdate(
145145
new Workspace({
146146
...this.state.workspace,
147+
// NOTE: this.state.workspace might be undefined here, leaving Workspace.id, Workspace.metadata and Workspace.spec undefined empty.
148+
// Thus we:
149+
// - fill in ID
150+
// - wait for fetchWorkspaceInfo to fill in metadata and spec in later render cycles
151+
id: resp.workspaceId,
147152
status: resp.status,
148153
}),
149154
);

0 commit comments

Comments
 (0)