Преглед на файлове

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
 							);
 						}