MOBILE-2650 utils: Do not create Window objects, it throws an exception

main
Albert Gasset 2018-10-08 16:29:35 +02:00
parent 82ca471c5b
commit ab8fddaaf3
1 changed files with 4 additions and 3 deletions

View File

@ -102,12 +102,12 @@ export class CoreIframeUtilsProvider {
} else { } else {
this.logger.warn('Cannot get iframe dir path to open relative url', url, element); this.logger.warn('Cannot get iframe dir path to open relative url', url, element);
return new Window(); // Return new Window object. return null;
} }
} else { } else {
this.logger.warn('Cannot get iframe src to open relative url', url, element); 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;
}; };
} }