소스 검색

fix(Station): Autofill newSongsToAdd throwing error if _id null

Owen Diffey 2 년 전
부모
커밋
2c52b18743
1개의 변경된 파일1개의 추가작업 그리고 1개의 파일을 삭제
  1. 1 1
      backend/logic/stations.js

+ 1 - 1
backend/logic/stations.js

@@ -562,7 +562,7 @@ class _StationsModule extends CoreClass {
 								if (err) next(err);
 								else {
 									const newSongsToAdd = songsToAdd.map(song =>
-										songs.find(newSong => newSong._id.toString() === song._id.toString())
+										songs.find(newSong => newSong.youtubeId === song.youtubeId)
 									);
 									next(null, currentSongs, newSongsToAdd, currentSongIndex);
 								}