Skip to content

Commit e1cd311

Browse files
committed
fix #33
1 parent 0df7bf3 commit e1cd311

File tree

2 files changed

+1
-1
lines changed

2 files changed

+1
-1
lines changed

epic-games.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ const SCREEN_WIDTH = Number(process.env.SCREEN_WIDTH) || 1280;
1717
const SCREEN_HEIGHT = Number(process.env.SCREEN_HEIGHT) || 1280;
1818

1919
const db = await jsonDb('epic-games.json');
20+
db.data ||= {};
2021
const migrateDb = (user) => {
2122
if (user in db.data || !('claimed' in db.data)) return;
2223
db.data[user] = {};

util.js

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,6 @@ import { Low, JSONFile } from 'lowdb';
1616
export const jsonDb = async file => {
1717
const db = new Low(new JSONFile(dataDir(file)));
1818
await db.read();
19-
db.data ||= {};
2019
return db;
2120
};
2221

0 commit comments

Comments
 (0)