Multi-window fix for Objects.isObject
This commit is contained in:
parent
d7cb85131d
commit
97bc2ab4ad
1 changed files with 2 additions and 1 deletions
3
lib/utils/prototypes.js
vendored
3
lib/utils/prototypes.js
vendored
|
@ -58,6 +58,7 @@ Object.defineProperty(Object, 'isObject', {
|
||||||
enumerable: false,
|
enumerable: false,
|
||||||
writable: true,
|
writable: true,
|
||||||
value: function (obj) {
|
value: function (obj) {
|
||||||
return ((!!obj) && (obj.constructor === Object))
|
return (obj != null && typeof obj === 'object' &&
|
||||||
|
Object.prototype.toString.call(obj) === '[object Object]')
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|
Loading…
Reference in a new issue