mirror of
https://github.com/bitwarden/browser
synced 2025-12-18 01:03:35 +00:00
return null for undefined storage key
This commit is contained in:
@@ -36,6 +36,9 @@ export class LowdbStorageService implements StorageService {
|
|||||||
|
|
||||||
get<T>(key: string): Promise<T> {
|
get<T>(key: string): Promise<T> {
|
||||||
const val = this.db.get(key).value();
|
const val = this.db.get(key).value();
|
||||||
|
if (val == null) {
|
||||||
|
return Promise.resolve(null);
|
||||||
|
}
|
||||||
return Promise.resolve(val as T);
|
return Promise.resolve(val as T);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user