mirror of
https://github.com/bitwarden/browser.git
synced 2024-11-23 11:56:00 +01:00
reload for edge if bg is null
This commit is contained in:
parent
092abb2aed
commit
8425e65544
@ -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;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user