bg null logging

This commit is contained in:
Kyle Spearrin 2018-09-29 08:09:43 -04:00
parent b55398d7ac
commit 092abb2aed
1 changed files with 6 additions and 1 deletions

View File

@ -14,7 +14,12 @@ export class LaunchGuardService implements CanActivate {
constructor(private cryptoService: CryptoService, private userService: UserService, private router: Router) { }
async canActivate() {
if (BrowserApi.getBackgroundPage() == null) {
const bg = BrowserApi.getBackgroundPage();
if (bg == null) {
// tslint:disable-next-line
console.log('Background page is null.');
// tslint:disable-next-line
console.log(bg);
this.router.navigate(['private-mode']);
return false;
}