From 95b5dfe16e7a3b565dd5b22504c6b430f2a660bb Mon Sep 17 00:00:00 2001 From: Vlad Date: Wed, 24 Mar 2021 14:26:41 +0200 Subject: [PATCH] fix: isObject cross window --- src/angular/src/utils/utils.ts | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/angular/src/utils/utils.ts b/src/angular/src/utils/utils.ts index 7f31f4096..5f2452fd4 100644 --- a/src/angular/src/utils/utils.ts +++ b/src/angular/src/utils/utils.ts @@ -1,5 +1,10 @@ export function isObject(o) { - return typeof o === 'object' && o !== null && o.constructor && o.constructor === Object; + return ( + typeof o === 'object' && + o !== null && + o.constructor && + Object.prototype.toString.call(o).slice(8, -1) === 'Object' + ); } export function extend(target, src) {