don't assume the own tile has a date

This commit is contained in:
Bruno Windels 2022-11-18 09:59:46 +01:00
parent 9c467d9149
commit aa77c557a6

View File

@ -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();