Skip to content

Commit

Permalink
fix: isObject cross window
Browse files Browse the repository at this point in the history
  • Loading branch information
vltansky committed Mar 24, 2021
1 parent 259c8c4 commit 95b5dfe
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/angular/src/utils/utils.ts
Original file line number Diff line number Diff line change
@@ -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) {
Expand Down

0 comments on commit 95b5dfe

Please sign in to comment.