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;