diff --git a/src/stores/room-list/MessagePreviewStore.ts b/src/stores/room-list/MessagePreviewStore.ts index 38e56881cc..1da0e661e8 100644 --- a/src/stores/room-list/MessagePreviewStore.ts +++ b/src/stores/room-list/MessagePreviewStore.ts @@ -124,7 +124,10 @@ export class MessagePreviewStore extends AsyncStoreWithClient { let changed = false; for (let i = events.length - 1; i >= 0; i--) { - if (i === events.length - MAX_EVENTS_BACKWARDS) return; // limit reached + if (i === events.length - MAX_EVENTS_BACKWARDS) { + // limit reached - clear the preview by breaking out of the loop + break; + } const event = events[i]; const previewDef = PREVIEWS[event.getType()];