Skip to content

Commit 60c5bc8

Browse files
authored
feat: Support empty storage (#64)
1 parent 559ecd8 commit 60c5bc8

File tree

2 files changed

+7
-9
lines changed

2 files changed

+7
-9
lines changed

.github/dependabot.yml

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -4,18 +4,10 @@ updates:
44
directory: "/"
55
schedule:
66
interval: "daily"
7-
labels:
8-
- "impact/no-changelog-required"
9-
- "github-actions"
10-
- "dependencies"
117
- package-ecosystem: "npm"
128
directory: "/"
139
schedule:
1410
interval: "daily"
1511
ignore:
1612
- dependency-name: "typescript*"
17-
labels:
18-
- "impact/no-changelog-required"
19-
- "npm"
20-
- "dependencies"
2113

src/storage.ts

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,8 +41,14 @@ export class Storage {
4141
} else {
4242
const exists = await this.hasFile(this.getFilePath());
4343
if (exists) {
44-
this.readContent = await fs.readFile(this.getFilePath(), 'utf-8')
44+
this.readContent = await fs.readFile(this.getFilePath(), 'utf-8');
4545
this.content = JSON.parse(this.readContent);
46+
} else {
47+
this.readContent = '';
48+
this.content = {
49+
github: [],
50+
todoist: [],
51+
};
4652
}
4753
}
4854
return this.content;

0 commit comments

Comments
 (0)