Explorar o código

fix(EditSong): Unable to create songs from scratch

Owen Diffey %!s(int64=2) %!d(string=hai) anos
pai
achega
686ccc8c0a
Modificáronse 1 ficheiros con 5 adicións e 3 borrados
  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 () => {