Selaa lähdekoodia

fix(EditSong): Unable to create songs from scratch

Owen Diffey 2 vuotta sitten
vanhempi
commit
686ccc8c0a
1 muutettua tiedostoa jossa 5 lisäystä ja 3 poistoa
  1. 5 3
      frontend/src/components/modals/EditSong/index.vue

+ 5 - 3
frontend/src/components/modals/EditSong/index.vue

@@ -1199,9 +1199,11 @@ watch(
 	() => drawCanvas()
 );
 watch(youtubeId, (_youtubeId, _oldYoutubeId) => {
-	console.log("NEW YOUTUBE ID", _youtubeId);
-	unloadSong(_oldYoutubeId);
-	loadSong(_youtubeId);
+	if (!newSong.value) {
+		console.log("NEW YOUTUBE ID", _youtubeId);
+		unloadSong(_oldYoutubeId);
+		loadSong(_youtubeId);
+	}
 });
 
 onMounted(async () => {