Got detecting Arrays working in firefox.
This commit is contained in:
+3
-1
@@ -192,16 +192,18 @@ Handlebars.SafeString.prototype.toString = function() {
|
||||
Handlebars.helperMissing = function(object, fn) {
|
||||
var ret = "";
|
||||
|
||||
console.log(object);
|
||||
if(object === true) {
|
||||
return fn(this);
|
||||
} else if(object === false) {
|
||||
return "";
|
||||
} else if(toString.call(object) === "[object Array]") {
|
||||
} else if(object.constructor === Array) {
|
||||
for(var i=0, j=object.length; i<j; i++) {
|
||||
ret = ret + fn(object[i]);
|
||||
}
|
||||
return ret;
|
||||
} else {
|
||||
console.log("HERE!");
|
||||
return fn(object);
|
||||
}
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user