node_modules/object-inspect/index.js in immosquare-cleaner-0.1.44 vs node_modules/object-inspect/index.js in immosquare-cleaner-0.1.45
- old
+ new
@@ -242,10 +242,13 @@
// note: in IE 8, sometimes `global !== window` but both are the prototypes of each other
/* eslint-env browser */
if (typeof window !== 'undefined' && obj === window) {
return '{ [object Window] }';
}
- if (obj === global) {
+ if (
+ (typeof globalThis !== 'undefined' && obj === globalThis)
+ || (typeof global !== 'undefined' && obj === global)
+ ) {
return '{ [object globalThis] }';
}
if (!isDate(obj) && !isRegExp(obj)) {
var ys = arrObjKeys(obj, inspect);
var isPlainObject = gPO ? gPO(obj) === Object.prototype : obj instanceof Object || obj.constructor === Object;