diff --git a/public/javascripts/app/helpers/handlebars-helpers.js b/public/javascripts/app/helpers/handlebars-helpers.js index 4b98f757d..da747a669 100644 --- a/public/javascripts/app/helpers/handlebars-helpers.js +++ b/public/javascripts/app/helpers/handlebars-helpers.js @@ -15,6 +15,10 @@ Handlebars.registerHelper('linkToPerson', function(context, block) { }) Handlebars.registerHelper('personImage', function(person, size, imageClass) { + /* we return here if person.avatar is blank, because this happens when a + * user is unauthenticated. we don't know why this happens... */ + if(typeof(person.avatar) == "undefined") { return } + size = (typeof(size) != "string" ? "small" : size); imageClass = (typeof(imageClass) != "string" ? size : imageClass);