Throw error if activeProjectScene is undefined

This commit is contained in:
2026-04-11 04:15:52 +02:00
parent 825ca26c30
commit ee6d941014

View File

@@ -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;