From 1945ebc59d272d41b586e947f67c204d368f911a Mon Sep 17 00:00:00 2001 From: Andrey Komisarenko Date: Thu, 9 Nov 2017 17:05:39 +0200 Subject: [PATCH] Fix for IE 11. window.hasOwnProperty('document') dosn't work in IE 11. --- src/services/ngx-ins-utils.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/services/ngx-ins-utils.ts b/src/services/ngx-ins-utils.ts index 60e5bfd7..ce53e51b 100644 --- a/src/services/ngx-ins-utils.ts +++ b/src/services/ngx-ins-utils.ts @@ -6,7 +6,7 @@ export function resolveContainerElement( defaultElement, fromRoot: boolean ): any { - const hasWindow = window && window.hasOwnProperty('document'); + const hasWindow = window && !!window.document; const containerIsString = selector && hasWindow && typeof selector === 'string'; let container = hasWindow && scrollWindow ? window : defaultElement;