mirror of
https://github.com/bitwarden/cli
synced 2025-12-25 04:33:13 +00:00
Fix/lowdb no cache (#443)
* Add jslib prettier commit to client ignore hashes * Remove lowdb caching * Fix state service remove being set to null * Await in-memory key retrieval * Fix key loading and unlock requests. * Linter fixes * linter fixes * linter fixes
This commit is contained in:
@@ -26,7 +26,11 @@ export class NodeEnvSecureStorageService implements StorageService {
|
||||
}
|
||||
|
||||
async save(key: string, obj: any): Promise<any> {
|
||||
if (typeof obj !== "string") {
|
||||
if (obj == null) {
|
||||
return this.remove(key);
|
||||
}
|
||||
|
||||
if (obj !== null && typeof obj !== "string") {
|
||||
throw new Error("Only string storage is allowed.");
|
||||
}
|
||||
const protectedObj = await this.encrypt(obj);
|
||||
|
||||
Reference in New Issue
Block a user