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;