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() {
|
||||
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.'));
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user