From 8ab1ffae177f09273b1790d1a86d3d61d111ed5a Mon Sep 17 00:00:00 2001 From: Alex Stupka Date: Wed, 15 Dec 2010 17:17:50 -0500 Subject: [PATCH] Use prototype toString method to avoid native types being returned. * For example, mozilla returns [xpconnect native prototype wrapper] vs [object Function] --- lib/handlebars/runtime.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/handlebars/runtime.js b/lib/handlebars/runtime.js index 6fa7f40e..29ace867 100644 --- a/lib/handlebars/runtime.js +++ b/lib/handlebars/runtime.js @@ -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("/");