From 40dd2c97502efe214343ff08c51d78ba5679203a Mon Sep 17 00:00:00 2001 From: Alan Johnson Date: Thu, 10 Feb 2011 06:27:03 -0500 Subject: [PATCH] Updated if helper - missed it in the last cleanup. It no longer supports methods as arguments. --- lib/handlebars/base.js | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/lib/handlebars/base.js b/lib/handlebars/base.js index 7d6c1ce2..583f88c2 100644 --- a/lib/handlebars/base.js +++ b/lib/handlebars/base.js @@ -86,8 +86,7 @@ Handlebars.registerHelper('each', function(context, fn, inverse) { }); Handlebars.registerHelper('if', function(context, fn, inverse) { - var condition = typeof context === "function" ? context.call(this) : context; - if(!condition || condition == []) { + if(!context || context == []) { return inverse(this); } else { return fn(this);