Merged
This commit is contained in:
@@ -86,7 +86,8 @@ Handlebars.registerHelper('each', function(context, fn, inverse) {
|
||||
});
|
||||
|
||||
Handlebars.registerHelper('if', function(context, fn, inverse) {
|
||||
if(!context || context === []) {
|
||||
var condition = typeof context === "function" ? context.call(this) : context;
|
||||
if(!condition || condition == []) {
|
||||
return inverse(this);
|
||||
} else {
|
||||
return fn(this);
|
||||
|
||||
Reference in New Issue
Block a user