Skip to content

Commit c77f755

Browse files
fix(web): sidebar drops a deleted project's filter with the local environment disabled (#28179)
Co-authored-by: Claude Opus 5.5 <[email protected]>
1 parent be58795 commit c77f755

2 files changed

Lines changed: 4 additions & 2 deletions

File tree

‎apps/web/src/localEnvironment.ts‎

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
11
export function isLocalEnvironmentDisabled(): boolean {
2-
return window.desktopBridge?.getLocalEnvironmentEnabled() === false;
2+
return (
3+
typeof window !== "undefined" && window.desktopBridge?.getLocalEnvironmentEnabled() === false
4+
);
35
}

‎apps/web/src/state/shell.ts‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -124,7 +124,7 @@ export const allEnvironmentProjectSnapshotsReadyAtom =
124124
createAllEnvironmentProjectSnapshotsReadyAtom({
125125
catalogValueAtom: environmentCatalog.catalogValueAtom,
126126
shellStateValueAtom: environmentShell.stateValueAtom,
127-
requiresPrimaryEnvironment: !isHostedStaticApp(),
127+
requiresPrimaryEnvironment: expectsPrimaryEnvironment(),
128128
});
129129

130130
/** Hosted clients and desktops with the local environment disabled never discover a primary. */

0 commit comments

Comments
 (0)