From ee6d941014fa84fe081494797eb7753e21959b9c Mon Sep 17 00:00:00 2001 From: Victor Giers Date: Sat, 11 Apr 2026 04:15:52 +0200 Subject: [PATCH] Throw error if activeProjectScene is undefined --- src/app/App.tsx | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/app/App.tsx b/src/app/App.tsx index ad7e6465..60a662f5 100644 --- a/src/app/App.tsx +++ b/src/app/App.tsx @@ -1104,6 +1104,13 @@ export function App({ store, initialStatusMessage }: AppProps) { const sceneList = Object.values(editorState.projectDocument.scenes); const activeProjectScene = editorState.projectDocument.scenes[editorState.activeSceneId]; + + if (activeProjectScene === undefined) { + throw new Error( + `Active scene ${editorState.activeSceneId} does not exist in the project document.` + ); + } + const brushList = Object.values(editorState.document.brushes); const layoutMode = editorState.viewportLayoutMode; const activePanelId = editorState.activeViewportPanelId;