1
0
mirror of https://github.com/bitwarden/jslib synced 2025-12-26 05:03:41 +00:00

[refactor] Remove an unecassary parameter from a StorageOptions instance

This commit is contained in:
addison
2021-11-04 16:19:55 -04:00
parent f47aecf083
commit a45e752a01

View File

@@ -45,7 +45,7 @@ export class VaultTimeoutService implements VaultTimeoutServiceAbstraction {
// Keys aren't stored for a device that is locked or logged out.
async isLocked(userId?: string): Promise<boolean> {
const neverLock = await this.cryptoService.hasKeyStored(KeySuffixOptions.Auto, userId) &&
!(await this.stateService.getEverBeenUnlocked(userId ? {userId: userId, storageLocation: StorageLocation.Disk} : null));
!(await this.stateService.getEverBeenUnlocked({ userId: userId }));
if (neverLock) {
return (await this.cryptoService.getKey(KeySuffixOptions.Auto, userId)) != null;
}