Permalink
Browse files

Update js/control.js

Non-video content doesn't always have a thumbnail field
  • Loading branch information...
1 parent f8cd862 commit 15bc3da5ce821cb579f415e3800a2d99e9ec0de6 @bruntonspall committed Aug 6, 2012
Showing with 4 additions and 2 deletions.
  1. +4 −2 js/control.js
View
@@ -134,15 +134,17 @@ control = {
var th = $('<div>').addClass('thumbholder').addClass('section_' + json.sectionId).css('top', todpos-12);
var dtime = $('<div>').addClass('time').addClass('tinyfont').html(d[0] + ':' + d[1]);
var dsection = $('<div>').addClass('sectionname').addClass('tinyfont').html(json.sectionName);
- var i = $('<img>').addClass('thumbnail').attr('src', json.fields.thumbnail).attr('title', d[0] + ':' + d[1]);
if (json.tags.length > 0) {
var dseries = $('<div>').addClass('series').addClass('tinyfont').html('series');
th.append(dseries);
}
th.append(dtime);
- th.append(i);
+ if ('thumbnail' in json.fields)
+ var i = $('<img>').addClass('thumbnail').attr('src', json.fields.thumbnail).attr('title', d[0] + ':' + d[1]);
+ th.append(i);
+ }
th.append(dsection);
$($('#week .dayholder')[dow.getDay()]).children('.fullday').append(th);

0 comments on commit 15bc3da

Please sign in to comment.