diff --git a/src/pages/tldraw/singlePlayerPage.tsx b/src/pages/tldraw/singlePlayerPage.tsx index cd0a740..688963b 100644 --- a/src/pages/tldraw/singlePlayerPage.tsx +++ b/src/pages/tldraw/singlePlayerPage.tsx @@ -98,6 +98,9 @@ export default function SinglePlayerPage() { shapeUtils: allShapeUtils, bindingUtils: allBindingUtils }); + // Pre-initialize tldraw's required records (TLINSTANCE, page, cameras) + // so computed signals that read currentPageId don't crash before Editor construction completes + (newStore as unknown as { ensureStoreIsUsable(): void }).ensureStoreIsUsable(); const snapSvc = new NavigationSnapshotService(newStore, editorRef.current || undefined); if (accessToken) snapSvc.setAccessToken(accessToken);