From dcef50bd8ff897e664477016252fc5b1b7ec1977 Mon Sep 17 00:00:00 2001 From: Kyle Spearrin Date: Tue, 9 Oct 2018 15:31:52 -0400 Subject: [PATCH] just use adapter --- src/services/lowdbStorage.service.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/services/lowdbStorage.service.ts b/src/services/lowdbStorage.service.ts index 50c01e66b3..e9621a0fcf 100644 --- a/src/services/lowdbStorage.service.ts +++ b/src/services/lowdbStorage.service.ts @@ -28,7 +28,7 @@ export class LowdbStorageService implements StorageService { this.db = lowdb(adapter); } catch (e) { if (e instanceof SyntaxError) { - fs.writeFileSync(this.dataFilePath, ''); + adapter.write({}); this.db = lowdb(adapter); } else { throw e;