Use prototype toString method to avoid native types being returned.

* For example, mozilla returns [xpconnect native prototype wrapper] vs [object Function]
This commit is contained in:
Alex Stupka
2010-12-15 17:17:50 -05:00
committed by David Stone
parent b7c649617b
commit 8ab1ffae17
+2 -2
View File
@@ -103,7 +103,7 @@ Handlebars.Runtime.prototype = {
var data = idObj.data;
var type = toString.call(data);
var type = Object.prototype.toString.call(data);
var functionType = (type === "[object Function]");
if(!functionType && params.length) {
@@ -196,7 +196,7 @@ Handlebars.Runtime.prototype = {
var context = this.wrapContext();
if(toString.call(data) === "[object Function]") {
if(Object.prototype.toString.call(data) === "[object Function]") {
params = this.evaluateParams(mustache.params);
id = id.parts.join("/");