diff --git a/web/client.ts b/web/client.ts index 67eb62c..2408741 100644 --- a/web/client.ts +++ b/web/client.ts @@ -168,7 +168,9 @@ export class Client { await this.dispatchAppEvent("editor:init"); setInterval(() => { - this.syncService.syncFile(`${this.currentPage!}.md`); + this.syncService.syncFile(`${this.currentPage!}.md`).catch((e: any) => { + console.error("Interval sync error", e); + }); }, pageSyncInterval); } diff --git a/web/sync_service.ts b/web/sync_service.ts index 3aa0920..6e74280 100644 --- a/web/sync_service.ts +++ b/web/sync_service.ts @@ -249,6 +249,7 @@ export class SyncService { await this.spaceSync.syncFile(snapshot, name, localHash, remoteHash); this.eventHook.dispatchEvent("sync:success"); + console.log("File successfully synced", name); } catch (e: any) { this.eventHook.dispatchEvent("sync:error", e.message); console.error("Sync error", e);