From 49e7aceef61f58babe88339ba29f03c1f27ef100 Mon Sep 17 00:00:00 2001 From: Thomas Citharel Date: Sat, 29 Jan 2022 15:54:58 +0100 Subject: [PATCH] Fix trashbin being inacessible when the calendar of a deleted object's unavailable Fix is very similar to https://github.com/nextcloud/tasks/pull/1873 Closes #3894 Signed-off-by: Thomas Citharel --- src/components/AppNavigation/CalendarList/Trashbin.vue | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/components/AppNavigation/CalendarList/Trashbin.vue b/src/components/AppNavigation/CalendarList/Trashbin.vue index 1241b85b9e..4ab2486471 100644 --- a/src/components/AppNavigation/CalendarList/Trashbin.vue +++ b/src/components/AppNavigation/CalendarList/Trashbin.vue @@ -171,7 +171,7 @@ export default { } catch (e) { // ignore } - let subline = vobject.calendar.displayName + let subline = vobject.calendar?.displayName || t('calendar', 'Unknown calendar') if (vobject.isEvent) { const event = vobject?.calendarComponent.getFirstComponent('VEVENT') if (event?.startDate.jsDate && event?.isAllDay()) { @@ -181,8 +181,8 @@ export default { } } const color = vobject.calendarComponent.getComponentIterator().next().value?.color - ?? vobject.calendar.color - ?? uidToHexColor(vobject.calendar.displayName) + ?? vobject.calendar?.color + ?? uidToHexColor(subline) return { vobject, type: 'object',