From ae95742c312848f8c66c6eb76f9a8ca3151d841f Mon Sep 17 00:00:00 2001 From: Richard Knoll Date: Wed, 20 Nov 2024 14:52:13 -0800 Subject: [PATCH] move github init after app target setup --- webapp/src/app.tsx | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/webapp/src/app.tsx b/webapp/src/app.tsx index eab841f53d3..6c0f5599543 100644 --- a/webapp/src/app.tsx +++ b/webapp/src/app.tsx @@ -5963,11 +5963,12 @@ document.addEventListener("DOMContentLoaded", async () => { pxt.blocks.showBlockIdInTooltip = true; } - initGitHubDb(); pxt.perf.measureStart("setAppTarget"); pkg.setupAppTarget((window as any).pxtTargetBundle); + initGitHubDb(); + // DO NOT put any async code before this line! The serviceworker must be initialized before // the window load event fires appcache.init(() => theEditor.reloadEditor());