diff --git a/src/editor/components/components/SceneEditTitle/SceneEditTitle.component.jsx b/src/editor/components/components/SceneEditTitle/SceneEditTitle.component.jsx index 0b23d1fd3..811300847 100644 --- a/src/editor/components/components/SceneEditTitle/SceneEditTitle.component.jsx +++ b/src/editor/components/components/SceneEditTitle/SceneEditTitle.component.jsx @@ -26,7 +26,9 @@ const SceneEditTitle = ({ sceneData }) => { const saveNewTitle = async (newTitle) => { try { - await updateSceneIdAndTitle(sceneData?.sceneId, newTitle); + if (sceneData?.sceneId) { + await updateSceneIdAndTitle(sceneData?.sceneId, newTitle); + } AFRAME.scenes[0].setAttribute('metadata', 'sceneTitle', newTitle); AFRAME.scenes[0].setAttribute('metadata', 'sceneId', sceneData?.sceneId); STREET.notify.successMessage(`New scene title saved: ${newTitle}`);