From 544e1e6196e711c0793510959d7bddf650ffd486 Mon Sep 17 00:00:00 2001 From: Robert Knight Date: Mon, 18 Nov 2024 11:27:05 +0000 Subject: [PATCH] Move point of logging --- src/hooks/project-hooks.tsx | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/hooks/project-hooks.tsx b/src/hooks/project-hooks.tsx index a7ac39e44..705f853ad 100644 --- a/src/hooks/project-hooks.tsx +++ b/src/hooks/project-hooks.tsx @@ -214,6 +214,9 @@ export const ProjectProvider = ({ if (hasTimedOut) { editorTimedOut(); logging.log("[MakeCode] Load timed out"); + logging.event({ + type: "makecode-load-failed", + }); throw new CodeEditorError("MakeCode load timed out"); } } finally { @@ -244,9 +247,6 @@ export const ProjectProvider = ({ }); } catch (e) { if (e instanceof CodeEditorError) { - logging.event({ - type: "makecode-load-failed", - }); openEditorTimedOutDialog(); } }