فهرست منبع

Fixed issue with station being null.

KrisVos130 8 سال پیش
والد
کامیت
507d0c005b
1فایلهای تغییر یافته به همراه1 افزوده شده و 0 حذف شده
  1. 1 0
      backend/logic/actions/stations.js

+ 1 - 0
backend/logic/actions/stations.js

@@ -134,6 +134,7 @@ module.exports = {
 	getPlaylist: (session, stationId, cb) => {
 		stations.getStation(stationId, (err, station) => {
 			if (err) return cb({ status: 'failure', message: 'Something went wrong when getting the station.' });
+			if (!station) return cb({ status: 'failure', message: 'Station not found..' });
 			if (station.type === 'official') {
 				cache.hget("officialPlaylists", stationId, (err, playlist) => {
 					if (err) return cb({ status: 'failure', message: 'Something went wrong when getting the playlist.' });