Merge pull request #213 from thejohnfreeman/master
Block helper "with" should check for empty context
This commit is contained in:
@@ -133,7 +133,7 @@ Handlebars.registerHelper('unless', function(context, options) {
|
||||
});
|
||||
|
||||
Handlebars.registerHelper('with', function(context, options) {
|
||||
return options.fn(context);
|
||||
if (!Handlebars.Utils.isEmpty(context)) return options.fn(context);
|
||||
});
|
||||
|
||||
Handlebars.registerHelper('log', function(context, options) {
|
||||
|
||||
Reference in New Issue
Block a user