From 9734c0f14c960b7264618de89bc39546c8d693d3 Mon Sep 17 00:00:00 2001 From: Zef Hemel Date: Sat, 20 Jan 2024 20:57:05 +0100 Subject: [PATCH] Fix sync mode offline crash --- web/space.ts | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/web/space.ts b/web/space.ts index ac577f1..8991fc0 100644 --- a/web/space.ts +++ b/web/space.ts @@ -26,7 +26,10 @@ export class Space { this.watchedPages.delete(pageName); } }); - this.updatePageList().catch(console.error); + setTimeout(() => { + // Next tick, to ensure that the space is initialized + this.updatePageList().catch(console.error); + }); } public async updatePageList() {