From 660f3e7063a9b4557413a686f458e316e3a83c31 Mon Sep 17 00:00:00 2001 From: CatLover <152669316+catloversg@users.noreply.github.com> Date: Mon, 16 Dec 2024 22:13:31 +0700 Subject: [PATCH] BUGFIX: Saved running scripts are started before SWC is initialized --- src/ui/LoadingScreen.tsx | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/ui/LoadingScreen.tsx b/src/ui/LoadingScreen.tsx index 86ab52f41a..5f680d049b 100644 --- a/src/ui/LoadingScreen.tsx +++ b/src/ui/LoadingScreen.tsx @@ -34,8 +34,9 @@ export function LoadingScreen(): React.ReactElement { }); useEffect(() => { - load() - .then((saveData) => Promise.all([initSwc(), Engine.load(saveData)])) + initSwc() + .then(() => load()) + .then((saveData) => Engine.load(saveData)) .then(() => { pushGameReady(); setLoaded(true);