diff --git a/lib/handlebars/compiler.js b/lib/handlebars/compiler.js index d22a0d4a..655dcd3a 100644 --- a/lib/handlebars/compiler.js +++ b/lib/handlebars/compiler.js @@ -81,7 +81,7 @@ Handlebars.registerHelper('blockHelperMissing', function(context, fn, inverse) { Handlebars.registerHelper('each', function(context, fn, inverse) { var ret = ""; - if(context.length > 0) { + if(context && context.length > 0) { for(var i=0, j=context.length; i