From 04135a5487e85cc7fa15914b1ef0f7d5b6e328d5 Mon Sep 17 00:00:00 2001 From: Jeff Emmett Date: Mon, 10 Nov 2025 18:57:04 -0800 Subject: [PATCH] updates to production --- src/routes/Board.tsx | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/src/routes/Board.tsx b/src/routes/Board.tsx index 5c07935..7880406 100644 --- a/src/routes/Board.tsx +++ b/src/routes/Board.tsx @@ -634,7 +634,17 @@ export function Board() { // Only render Tldraw when store is ready and synced // This ensures shapes are loaded before Tldraw initializes - if (!store.store || store.status !== 'synced-remote') { + // In production, be more lenient - allow rendering if store exists and has shapes + const isProduction = import.meta.env.PROD || import.meta.env.MODE === 'production' + const hasStore = !!store.store + const isSynced = store.status === 'synced-remote' + const hasShapes = store.store ? store.store.allRecords().filter((r: any) => r.typeName === 'shape').length > 0 : false + + // In production, allow rendering if store exists and has shapes, even if not fully synced + // This handles cases where network issues prevent 'synced-remote' status + const shouldRender = hasStore && (isSynced || (isProduction && hasShapes)) + + if (!shouldRender) { return (