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