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:
@@ -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("/");
|
||||
|
||||
|
||||
Reference in New Issue
Block a user