1
0
mirror of https://github.com/bitwarden/browser.git synced 2024-11-23 11:56:00 +01:00

just use adapter

This commit is contained in:
Kyle Spearrin 2018-10-09 15:31:52 -04:00
parent 2870b7472b
commit dcef50bd8f

View File

@ -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;