瀏覽代碼

fix(EditSong): Only join edit-song room if a song

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

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

@@ -1401,9 +1401,9 @@ export default {
 
 						this.songDataLoaded = true;
 
-						this.socket.dispatch(
+						if (song._id) this.socket.dispatch(
 							"apis.joinRoom",
-							`edit-song.${this.song._id}`
+							`edit-song.${song._id}`
 						);
 
 						if (
@@ -1411,7 +1411,7 @@ export default {
 							this.video.player.cueVideoById
 						) {
 							this.video.player.cueVideoById(
-								this.youtubeId,
+								youtubeId,
 								song.skipDuration
 							);
 						}