diff --git a/src/app/reminder-plugin/components/reminder-drawer/reminder-drawer.component.ts b/src/app/reminder-plugin/components/reminder-drawer/reminder-drawer.component.ts index 077ae11..e4af86a 100644 --- a/src/app/reminder-plugin/components/reminder-drawer/reminder-drawer.component.ts +++ b/src/app/reminder-plugin/components/reminder-drawer/reminder-drawer.component.ts @@ -142,12 +142,13 @@ export class ReminderDrawerComponent implements OnDestroy { } private highlightChanges(): void { - if (!this._previousState.length) return; + if (!this.reminders.length) return; // check if a reminder is new in a group this.reminderGroups.forEach((group, index) => { group.reminders.forEach((reminder) => { - if (!this._previousState[index].includes(reminder.id)) { + if (!this._previousState[index]?.includes(reminder.id)) { + console.log('highlight', reminder.id); reminder.changed = true; setTimeout( () => delete reminder.changed,