From 2c3b97bb66f94e767a4320635a7c8cf8b950f90f Mon Sep 17 00:00:00 2001 From: Alan Johnson Date: Sat, 11 Sep 2010 09:48:17 -0400 Subject: [PATCH] Got detecting Arrays working in firefox. --- lib/handlebars.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/lib/handlebars.js b/lib/handlebars.js index 03e8fea9..261cbb77 100644 --- a/lib/handlebars.js +++ b/lib/handlebars.js @@ -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