mirror of
https://github.com/bitwarden/browser
synced 2025-12-12 14:23:32 +00:00
use hasKey helper
This commit is contained in:
@@ -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.'));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user