Skip to content

Commit 008fe34

Browse files
fix(app): resolve react doctor errors (anomalyco#1720)
1 parent a83c607 commit 008fe34

3 files changed

Lines changed: 4 additions & 3 deletions

File tree

‎apps/app/src/react-app/kernel/global-sdk-provider.tsx‎

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -187,14 +187,15 @@ export function GlobalSDKProvider({ children }: GlobalSDKProviderProps) {
187187

188188
if (Date.now() - yielded < 8) continue;
189189
yielded = Date.now();
190-
await new Promise<void>((resolve) => setTimeout(resolve, 0));
190+
await Promise.resolve();
191191
}
192192
})()
193193
.finally(flush)
194194
.catch(() => undefined);
195195

196196
return () => {
197197
abort.abort();
198+
if (timer) clearTimeout(timer);
198199
flush();
199200
};
200201
// headers is re-derived from local storage; rerun only when server URL or health flips.

‎apps/app/src/react-app/shell/app-root.tsx‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ function DenSigninGate({ children }: DenSigninGateProps) {
7575
}, [
7676
denAuth.isSignedIn,
7777
denAuth.status,
78-
location.pathname,
78+
location,
7979
navigate,
8080
requireSignin,
8181
]);

‎apps/app/src/react-app/shell/settings-route.tsx‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1217,7 +1217,7 @@ export function SettingsRoute() {
12171217
void workspaceSetRuntimeActive(workspaceId).catch(() => undefined);
12181218
}
12191219
navigate(workspaceSettingsRoute(workspaceId, settingsPathForRoute(route)), { state: location.state });
1220-
}, [location.state, navigate, route]);
1220+
}, [location, navigate, route]);
12211221

12221222
const handleOpenRenameWorkspace = useCallback((workspaceId: string) => {
12231223
const workspace = workspaces.find((item) => item.id === workspaceId);

0 commit comments

Comments
 (0)