Updated if helper - missed it in the last cleanup. It no longer supports methods as arguments.

This commit is contained in:
Alan Johnson
2011-02-10 06:27:03 -05:00
parent ac4d34dbe3
commit 40dd2c9750
+1 -2
View File
@@ -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);