mirror of
https://github.com/bitwarden/browser
synced 2025-12-18 01:03:35 +00:00
just use adapter
This commit is contained in:
@@ -28,7 +28,7 @@ export class LowdbStorageService implements StorageService {
|
|||||||
this.db = lowdb(adapter);
|
this.db = lowdb(adapter);
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
if (e instanceof SyntaxError) {
|
if (e instanceof SyntaxError) {
|
||||||
fs.writeFileSync(this.dataFilePath, '');
|
adapter.write({});
|
||||||
this.db = lowdb(adapter);
|
this.db = lowdb(adapter);
|
||||||
} else {
|
} else {
|
||||||
throw e;
|
throw e;
|
||||||
|
|||||||
Reference in New Issue
Block a user