From 272bb11fcf3205b272061de6ea757915864451b7 Mon Sep 17 00:00:00 2001 From: Duncan Sommerville Date: Thu, 30 Apr 2015 14:36:33 -0400 Subject: [PATCH] Fixed player displaying nothing (instead of Offline) when no show is scheduled --- airtime_mvc/application/views/scripts/embed/player.phtml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/airtime_mvc/application/views/scripts/embed/player.phtml b/airtime_mvc/application/views/scripts/embed/player.phtml index 30d4736bc..6c3b1d06b 100644 --- a/airtime_mvc/application/views/scripts/embed/player.phtml +++ b/airtime_mvc/application/views/scripts/embed/player.phtml @@ -252,8 +252,8 @@ success: function(data) { if (data.current === null) { - if (data.currentShow != null) { - //Master/show source have no current track but they do have a current show. + if (data.currentShow != null && data.currentShow.length != 0) { + // Master/show source have no current track but they do have a current show. $("p.now_playing").html(data.currentShow[0].name); } else { $("p.now_playing").html("Offline");