1
0
mirror of https://github.com/bitwarden/browser.git synced 2024-11-27 12:36:14 +01:00

use hasKey helper

This commit is contained in:
Kyle Spearrin 2018-06-13 17:20:09 -04:00
parent 748274bf84
commit 47864c4c39

View File

@ -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.'));
}
}