mirror of
https://github.com/bitwarden/browser
synced 2025-12-19 01:33:33 +00:00
implement hasKey helper
This commit is contained in:
@@ -33,10 +33,9 @@ export class LockComponent extends BaseLockComponent implements OnInit {
|
||||
|
||||
async ngOnInit() {
|
||||
const authed = await this.userService.isAuthenticated();
|
||||
const key = await this.cryptoService.getKey();
|
||||
if (!authed) {
|
||||
this.router.navigate(['/']);
|
||||
} else if (key != null) {
|
||||
} else if (await this.cryptoService.hasKey()) {
|
||||
this.router.navigate(['vault']);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user