diff options
author | Alex Stupka <astupka21@yahoo.com> | 2010-12-15 17:17:50 -0500 |
---|---|---|
committer | David Stone <david@gixug.com> | 2011-01-17 15:42:27 -0800 |
commit | 8ab1ffae177f09273b1790d1a86d3d61d111ed5a (patch) | |
tree | 6dca4e3b64f19830692af6ee1e03daa06b5c8daf /lib/handlebars/runtime.js | |
parent | b7c649617bd0159d732032c4a39a77adae452154 (diff) | |
download | handlebars.js-8ab1ffae177f09273b1790d1a86d3d61d111ed5a.zip handlebars.js-8ab1ffae177f09273b1790d1a86d3d61d111ed5a.tar.gz handlebars.js-8ab1ffae177f09273b1790d1a86d3d61d111ed5a.tar.bz2 |
Use prototype toString method to avoid native types being returned.
* For example, mozilla returns [xpconnect native prototype wrapper] vs [object Function]
Diffstat (limited to 'lib/handlebars/runtime.js')
-rw-r--r-- | lib/handlebars/runtime.js | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/handlebars/runtime.js b/lib/handlebars/runtime.js index 6fa7f40..29ace86 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("/"); |