diff --git a/client/js/templating.js b/client/js/templating.js
index <HASH>..<HASH> 100644
--- a/client/js/templating.js
+++ b/client/js/templating.js
@@ -106,7 +106,7 @@ qq.Templating = function(spec) {
         if (!showThumbnails) {
             thumbnail && qq(thumbnail).remove();
         }
-        else {
+        else if (thumbnail) {
             thumbnailMaxSize = parseInt(thumbnail.getAttribute(THUMBNAIL_MAX_SIZE_ATTR));
         }
         showThumbnails = showThumbnails && thumbnail;
fix(client/js/templating.js): #<I> - don't blow up if img is omitted in template