From 7892021bb65723f53f1eed5eba52319d66544899 Mon Sep 17 00:00:00 2001 From: Richard Knoll Date: Fri, 17 Jan 2025 10:03:32 -0800 Subject: [PATCH] move github init after app target setup (#10284) --- 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 1d829d6088bb..09eaf2a1370a 100644 --- a/webapp/src/app.tsx +++ b/webapp/src/app.tsx @@ -5924,11 +5924,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());