Selaa lähdekoodia

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

Owen Diffey 2 vuotta sitten
vanhempi
commit
f107bfa134
1 muutettua tiedostoa jossa 3 lisäystä ja 3 poistoa
  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
 							);
 						}