We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 38adc7b commit a0d6df2Copy full SHA for a0d6df2
src/4-storage/index.ts
@@ -19,10 +19,14 @@ export async function createStore(
19
const repo = new GHRepository(token, username, repoName);
20
21
if (navigator.onLine) {
22
- await repo
+ const isNewRepository = repo
23
.createIfNecessary('Database for notes', true)
24
// We don't want the app to crash if this doesn't work
25
- .catch(() => null);
+ .catch(() => false);
26
+
27
+ if (await isNewRepository) {
28
+ window.location.reload();
29
+ }
30
}
31
32
// const local = new LocalStore(repoName);
0 commit comments