From ac736c0174dadadfb31c434a771b1a3153d589a8 Mon Sep 17 00:00:00 2001 From: Victor Giers Date: Sat, 11 Apr 2026 04:35:50 +0200 Subject: [PATCH] Add missing scene entry option handling in App.tsx --- src/app/App.tsx | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/src/app/App.tsx b/src/app/App.tsx index 463c8148..74de2813 100644 --- a/src/app/App.tsx +++ b/src/app/App.tsx @@ -1403,6 +1403,23 @@ export function App({ store, initialStatusMessage }: AppProps) { useState(""); const [sceneExitTargetEntryIdDraft, setSceneExitTargetEntryIdDraft] = useState(""); + const selectedSceneExitTargetEntryOptions = [ + ...(sceneEntryOptionsBySceneId[sceneExitTargetSceneIdDraft] ?? []) + ]; + if ( + sceneExitTargetEntryIdDraft.trim().length > 0 && + !selectedSceneExitTargetEntryOptions.some( + ({ entity }) => entity.id === sceneExitTargetEntryIdDraft + ) + ) { + selectedSceneExitTargetEntryOptions.push({ + entity: createSceneEntryEntity({ + id: sceneExitTargetEntryIdDraft, + name: "Missing Scene Entry" + }), + label: `Missing Scene Entry (${sceneExitTargetEntryIdDraft})` + }); + } const [modelPositionDraft, setModelPositionDraft] = useState( createVec3Draft(DEFAULT_MODEL_INSTANCE_POSITION) );