mirror of
https://github.com/bitwarden/browser.git
synced 2024-11-23 11:56:00 +01:00
use hasKey helper
This commit is contained in:
parent
748274bf84
commit
47864c4c39
@ -565,8 +565,8 @@ export class Program {
|
||||
|
||||
private async exitIfLocked() {
|
||||
await this.exitIfNotAuthed();
|
||||
const key = await this.main.cryptoService.getKey();
|
||||
if (key == null) {
|
||||
const hasKey = await this.main.cryptoService.hasKey();
|
||||
if (!hasKey) {
|
||||
this.processResponse(Response.error('Vault is locked.'));
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user