From ab8fddaaf340c3380beff10136c663a2287fe2b0 Mon Sep 17 00:00:00 2001 From: Albert Gasset Date: Mon, 8 Oct 2018 16:29:35 +0200 Subject: [PATCH] MOBILE-2650 utils: Do not create Window objects, it throws an exception --- src/providers/utils/iframe.ts | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/providers/utils/iframe.ts b/src/providers/utils/iframe.ts index 55cbd8304..504bdb3ae 100644 --- a/src/providers/utils/iframe.ts +++ b/src/providers/utils/iframe.ts @@ -102,12 +102,12 @@ export class CoreIframeUtilsProvider { } else { this.logger.warn('Cannot get iframe dir path to open relative url', url, element); - return new Window(); // Return new Window object. + return null; } } else { this.logger.warn('Cannot get iframe src to open relative url', url, element); - return new Window(); // Return new Window object. + return null; } } @@ -126,7 +126,8 @@ export class CoreIframeUtilsProvider { } } - return new Window(); // Return new Window object. + // We cannot create new Window objects directly, return null which is a valid return value for Window.open(). + return null; }; }