From 423a6ce1100c895db89448ca75de0d0cae503f81 Mon Sep 17 00:00:00 2001 From: catloversg <152669316+catloversg@users.noreply.github.com> Date: Sun, 5 Jan 2025 07:52:56 +0700 Subject: [PATCH] BUGFIX: Saved running scripts are started before SWC is initialized (#1857) * BUGFIX: Saved running scripts are started before SWC is initialized * Update based on feedback --- src/ui/LoadingScreen.tsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/ui/LoadingScreen.tsx b/src/ui/LoadingScreen.tsx index 86ab52f41..1f5dd06e5 100644 --- a/src/ui/LoadingScreen.tsx +++ b/src/ui/LoadingScreen.tsx @@ -34,8 +34,8 @@ export function LoadingScreen(): React.ReactElement { }); useEffect(() => { - load() - .then((saveData) => Promise.all([initSwc(), Engine.load(saveData)])) + Promise.all([initSwc(), load()]) + .then(([__, saveData]) => Engine.load(saveData)) .then(() => { pushGameReady(); setLoaded(true);