瀏覽代碼

fix: EditSong fixes

Kristian Vos 1 年之前
父節點
當前提交
15349c909a
共有 1 個文件被更改,包括 2 次插入2 次删除
  1. 2 2
      frontend/src/components/modals/EditSong/index.vue

+ 2 - 2
frontend/src/components/modals/EditSong/index.vue

@@ -1200,8 +1200,8 @@ watch(
 );
 watch(youtubeId, (_youtubeId, _oldYoutubeId) => {
 	console.log("NEW YOUTUBE ID", _youtubeId);
-	unloadSong(_oldYoutubeId);
-	loadSong(_youtubeId);
+	if (_oldYoutubeId) unloadSong(_oldYoutubeId);
+	if (_youtubeId) loadSong(_youtubeId);
 });
 
 onMounted(async () => {