Skip to content

Commit

Permalink
dont update title in firebase without sceneId
Browse files Browse the repository at this point in the history
  • Loading branch information
Algorush committed Jun 11, 2024
1 parent f772bcb commit 8fb4abe
Showing 1 changed file with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -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}`);
Expand Down

0 comments on commit 8fb4abe

Please sign in to comment.