Bläddra i källkod

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

Owen Diffey 1 år sedan
förälder
incheckning
f107bfa134
1 ändrade filer med 3 tillägg och 3 borttagningar
  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
 							);
 						}