From 97bc2ab4adaaa4f3d3bc4639a9260422de1ba0fa Mon Sep 17 00:00:00 2001 From: pyoor Date: Thu, 8 Jun 2017 18:15:31 -0400 Subject: [PATCH] Multi-window fix for Objects.isObject --- lib/utils/prototypes.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/utils/prototypes.js b/lib/utils/prototypes.js index af3cacb..cbff179 100644 --- a/lib/utils/prototypes.js +++ b/lib/utils/prototypes.js @@ -58,6 +58,7 @@ Object.defineProperty(Object, 'isObject', { enumerable: false, writable: true, value: function (obj) { - return ((!!obj) && (obj.constructor === Object)) + return (obj != null && typeof obj === 'object' && + Object.prototype.toString.call(obj) === '[object Object]') } })