diff --git a/dist/handlebars.js b/dist/handlebars.js index 39afa6419..87214df29 100644 --- a/dist/handlebars.js +++ b/dist/handlebars.js @@ -156,7 +156,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) { diff --git a/dist/handlebars.runtime.js b/dist/handlebars.runtime.js index a55b30fd4..4779ad0a3 100644 --- a/dist/handlebars.runtime.js +++ b/dist/handlebars.runtime.js @@ -156,7 +156,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) {