1
0
mirror of https://github.com/bitwarden/jslib synced 2025-12-22 11:13:17 +00:00

implement hasKey helper

This commit is contained in:
Kyle Spearrin
2018-06-13 17:14:26 -04:00
parent eda99e4f12
commit 3303e60b40
7 changed files with 18 additions and 16 deletions

View File

@@ -179,8 +179,8 @@ export class CipherService implements CipherServiceAbstraction {
}
const decCiphers: CipherView[] = [];
const key = await this.cryptoService.getKey();
if (key == null) {
const hasKey = await this.cryptoService.hasKey();
if (!hasKey) {
throw new Error('No key.');
}