From dcff7d146bfbe263ee21e4452f32776fe39e7a82 Mon Sep 17 00:00:00 2001 From: AAGaming Date: Thu, 27 Jun 2024 00:07:38 -0400 Subject: move webpack check into index --- frontend/src/index.ts | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'frontend') diff --git a/frontend/src/index.ts b/frontend/src/index.ts index 1d151dd8..1039fb23 100644 --- a/frontend/src/index.ts +++ b/frontend/src/index.ts @@ -5,6 +5,11 @@ interface Window { } (async () => { + // Wait for react to definitely be loaded + while (!window.webpackChunksteamui || window.webpackChunksteamui <= 3) { + await new Promise(r => setTimeout(r, 10)); // Can't use DFL sleep here. + } + if (!window.SP_REACT) { console.debug('[Decky:Boot] Setting up React globals...'); // deliberate partial import -- cgit v1.2.3