From 7fb541217686b6af5b8eaccf35cbdbd9da9e3dfd Mon Sep 17 00:00:00 2001 From: Bruno Windels Date: Mon, 30 Aug 2021 15:12:25 +0200 Subject: [PATCH] keep comment where it was --- src/matrix/room/timeline/persistence/SyncWriter.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/matrix/room/timeline/persistence/SyncWriter.js b/src/matrix/room/timeline/persistence/SyncWriter.js index 240feb76..54fd5a0b 100644 --- a/src/matrix/room/timeline/persistence/SyncWriter.js +++ b/src/matrix/room/timeline/persistence/SyncWriter.js @@ -148,8 +148,8 @@ export class SyncWriter { async _writeTimeline(timelineEvents, timeline, memberSync, currentKey, txn, log) { const entries = []; const updatedEntries = []; - // only create a fragment when we will really write an event if (timelineEvents?.length) { + // only create a fragment when we will really write an event currentKey = await this._ensureLiveFragment(currentKey, entries, timeline, txn, log); log.set("timelineEvents", timelineEvents.length); let timelineStateEventCount = 0;