From db47593e349ca5226b70a61405d6177b63c19119 Mon Sep 17 00:00:00 2001 From: Tuomas Palenius Date: Thu, 15 Aug 2013 06:05:11 +0300 Subject: [PATCH] Fix #597. If-helper doesn't anymore consider 0 as falsy value. --- lib/handlebars/base.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/handlebars/base.js b/lib/handlebars/base.js index 44a369c5e..b8e11eb2f 100644 --- a/lib/handlebars/base.js +++ b/lib/handlebars/base.js @@ -137,7 +137,7 @@ Handlebars.registerHelper('if', function(conditional, options) { var type = toString.call(conditional); if(type === functionType) { conditional = conditional.call(this); } - if(!conditional || Handlebars.Utils.isEmpty(conditional)) { + if(Handlebars.Utils.isEmpty(conditional)) { return options.inverse(this); } else { return options.fn(this);