From aa77c557a6018749fc3115169934463b568ca501 Mon Sep 17 00:00:00 2001 From: Bruno Windels <274386+bwindels@users.noreply.github.com> Date: Fri, 18 Nov 2022 09:59:46 +0100 Subject: [PATCH] don't assume the own tile has a date --- src/domain/session/room/timeline/tiles/SimpleTile.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/domain/session/room/timeline/tiles/SimpleTile.js b/src/domain/session/room/timeline/tiles/SimpleTile.js index 56c4c002..14aade54 100644 --- a/src/domain/session/room/timeline/tiles/SimpleTile.js +++ b/src/domain/session/room/timeline/tiles/SimpleTile.js @@ -46,7 +46,7 @@ export class SimpleTile extends ViewModel { _updateDateSeparator(prev) { let hasDateSeparator; if (prev instanceof SimpleTile) { - if (prev && prev._date) { + if (prev && prev._date && this._date) { hasDateSeparator = prev._date.getFullYear() !== this._date.getFullYear() || prev._date.getMonth() !== this._date.getMonth() || prev._date.getDate() !== this._date.getDate();