From a841425cce48d08f35100379a5f1673c8b78e2d1 Mon Sep 17 00:00:00 2001 From: Alex TYRODE Date: Mon, 28 Apr 2025 03:20:33 +0000 Subject: [PATCH] fix: re-integrate excalidrawAPI into window object --- src/frontend/src/App.tsx | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/src/frontend/src/App.tsx b/src/frontend/src/App.tsx index 8167c28..84ac890 100644 --- a/src/frontend/src/App.tsx +++ b/src/frontend/src/App.tsx @@ -55,6 +55,16 @@ export default function App({ } }); + + useEffect(() => { + if (excalidrawAPI) { + (window as any).excalidrawAPI = excalidrawAPI; + } + return () => { + (window as any).excalidrawAPI = null; + }; + }, [excalidrawAPI]); + const lastSentCanvasDataRef = useRef(""); const debouncedLogChange = useCallback(