Skip to content

Commit 4f299c6

Browse files
committed
fix(app-shell): keep the app-list reader ref out of render
Claude-Session: https://claude.ai/code/session_017xRBcWDb7S8Z7oRDGzvfT2 Co-authored-by: Claude <noreply@anthropic.com>
1 parent 30d0399 commit 4f299c6

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

‎ui/packages/app-shell/src/console/appObjectScope.ts‎

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1003,7 +1003,9 @@ export function useAppObjectScopePrefetch(): void {
10031003
// provider's eager app-list read: it never asks the list again.
10041004
const routeSegment = segments[0] === 'apps' ? segments[1] : undefined;
10051005
const ensureTypeRef = useRef(ensureType);
1006-
ensureTypeRef.current = ensureType;
1006+
useEffect(() => {
1007+
ensureTypeRef.current = ensureType;
1008+
});
10071009
const listEnteredRef = useRef<string | null>(null);
10081010
useEffect(
10091011
() => () => {

0 commit comments

Comments
 (0)