From 2cf114d2b35b3f3019897637e639a2b0876c2a76 Mon Sep 17 00:00:00 2001 From: Victor Giers Date: Mon, 27 Apr 2026 17:25:33 +0200 Subject: [PATCH] Improve handling of optional projectDocument when building runtime scenes --- src/runtime-three/runtime-scene-build.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/runtime-three/runtime-scene-build.ts b/src/runtime-three/runtime-scene-build.ts index 18f3c498..12590f9f 100644 --- a/src/runtime-three/runtime-scene-build.ts +++ b/src/runtime-three/runtime-scene-build.ts @@ -1839,7 +1839,9 @@ export function buildRuntimeSceneFromDocument( assertRuntimeSceneBuildable(document, { navigationMode, loadedModelAssets: options.loadedModelAssets, - projectDocument: options.projectDocument + ...(options.projectDocument === undefined + ? {} + : { projectDocument: options.projectDocument }) }); const enabledBrushes = Object.values(document.brushes).filter(