1
0
mirror of https://github.com/bitwarden/browser.git synced 2024-08-31 00:01:03 +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() {
const bg = BrowserApi.getBackgroundPage();
if (bg == null) {
// tslint:disable-next-line
console.log('Background page is null.');
// tslint:disable-next-line
console.log(bg);
if (window.navigator.userAgent.indexOf(' Edge/') !== -1) {
// tslint:disable-next-line
console.log('Background page is null.');
// 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']);
return false;
}