1
0
mirror of https://github.com/bitwarden/browser.git synced 2024-09-14 02:08:50 +02:00

reload for edge if bg is null

This commit is contained in:
Kyle Spearrin 2018-09-29 17:33:35 -04:00
parent 092abb2aed
commit 8425e65544

View File

@ -16,10 +16,17 @@ export class LaunchGuardService implements CanActivate {
async canActivate() { async canActivate() {
const bg = BrowserApi.getBackgroundPage(); const bg = BrowserApi.getBackgroundPage();
if (bg == null) { if (bg == null) {
// tslint:disable-next-line if (window.navigator.userAgent.indexOf(' Edge/') !== -1) {
console.log('Background page is null.'); // tslint:disable-next-line
// tslint:disable-next-line console.log('Background page is null.');
console.log(bg); // tslint:disable-next-line
console.log(bg);
window.setTimeout(() => {
// tslint:disable-next-line
console.log('Reload page for Edge.');
window.location.reload();
}, 1000);
}
this.router.navigate(['private-mode']); this.router.navigate(['private-mode']);
return false; return false;
} }