Skip to content

Commit 420ba16

Browse files
committed
Merge branch 'timbru31-ie-fixes'
* timbru31-ie-fixes: Use Object.prototype.toString.call to fix IE issue
2 parents cd2c756 + b6572cc commit 420ba16

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

jmespath.js

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,15 +3,15 @@
33

44
function isArray(obj) {
55
if (obj !== null) {
6-
return toString.call(obj) === "[object Array]";
6+
return Object.prototype.toString.call(obj) === "[object Array]";
77
} else {
88
return false;
99
}
1010
}
1111

1212
function isObject(obj) {
1313
if (obj !== null) {
14-
return toString.call(obj) === "[object Object]";
14+
return Object.prototype.toString.call(obj) === "[object Object]";
1515
} else {
1616
return false;
1717
}
@@ -24,8 +24,8 @@
2424
}
2525

2626
// Check if they are the same type.
27-
var firstType = toString.call(first);
28-
if (firstType !== toString.call(second)) {
27+
var firstType = Object.prototype.toString.call(first);
28+
if (firstType !== Object.prototype.toString.call(second)) {
2929
return false;
3030
}
3131
// We know that first and second have the same type so we can just check the
@@ -1332,7 +1332,7 @@
13321332
}
13331333
},
13341334
getTypeName: function(obj) {
1335-
switch (toString.call(obj)) {
1335+
switch (Object.prototype.toString.call(obj)) {
13361336
case "[object String]":
13371337
return "string";
13381338
case "[object Number]":

0 commit comments

Comments
 (0)