From 03c5c81bf36d8d4a479535dc644071c5fd47defb Mon Sep 17 00:00:00 2001 From: Jimmy Reichley Date: Wed, 30 Dec 2015 14:31:32 -0500 Subject: [PATCH] Fix issue where shows without icons would use the last icon that was displayed This was due to JS hoisting our var declaration, so I also made this hoist more clear/explicit. --- dashboard-ui/scripts/livetvcomponents.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/dashboard-ui/scripts/livetvcomponents.js b/dashboard-ui/scripts/livetvcomponents.js index 15f5d2872b..b6d5e9e1ba 100644 --- a/dashboard-ui/scripts/livetvcomponents.js +++ b/dashboard-ui/scripts/livetvcomponents.js @@ -6,8 +6,8 @@ require(['paper-fab', 'paper-item-body', 'paper-icon-item'], function () { var html = ''; - var index = ''; + var imgUrl; for (var i = 0, length = timers.length; i < length; i++) { @@ -31,8 +31,8 @@ html += ''; var program = timer.ProgramInfo || {}; - var imgUrl; + imgUrl = null; if (program.ImageTags && program.ImageTags.Primary) { imgUrl = ApiClient.getScaledImageUrl(program.Id, {