From 5c15eb18748e350eda16e803ec59635fb484d535 Mon Sep 17 00:00:00 2001 From: Marco Bachmann Date: Thu, 30 Nov 2017 13:44:31 +0100 Subject: [PATCH] use html container if passed in --- src/services/ngx-ins-utils.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/services/ngx-ins-utils.ts b/src/services/ngx-ins-utils.ts index ce53e51b..85a84022 100644 --- a/src/services/ngx-ins-utils.ts +++ b/src/services/ngx-ins-utils.ts @@ -7,10 +7,10 @@ export function resolveContainerElement( fromRoot: boolean ): any { const hasWindow = window && !!window.document; - const containerIsString = - selector && hasWindow && typeof selector === 'string'; let container = hasWindow && scrollWindow ? window : defaultElement; - if (containerIsString) { + if (selector) { + const containerIsString = + selector && hasWindow && typeof selector === 'string'; container = containerIsString ? findElement(selector, defaultElement.nativeElement, fromRoot) : selector;