mirror of
https://github.com/bitwarden/clients.git
synced 2026-07-10 21:03:56 +08: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