diff --git a/frontend/src/index.ts b/frontend/src/index.ts index 97357b82..4a5fc7f8 100644 --- a/frontend/src/index.ts +++ b/frontend/src/index.ts @@ -16,8 +16,10 @@ interface Window { console.time('[Decky:Boot] Waiting for React root mount...'); let root; while ( + // Does React root node exist? !(root = document.getElementById('root')) || - !(root as any)[Object.keys(root).find((k) => k.startsWith('__reactContainer$')) as string] + // Does it have a child element? + !(root as any)[Object.keys(root).find((k) => k.startsWith('__reactContainer$')) as string].child ) { await new Promise((r) => setTimeout(r, 10)); // Can't use DFL sleep here. }