Skip to content

Commit

Permalink
Fix trashbin being inacessible when the calendar of a deleted object'…
Browse files Browse the repository at this point in the history
…s unavailable

Fix is very similar to nextcloud/tasks#1873

Closes #3894

Signed-off-by: Thomas Citharel <tcit@tcit.fr>
  • Loading branch information
tcitworld committed Jan 29, 2022
1 parent 9f1c5e1 commit 5b5162b
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/components/AppNavigation/CalendarList/Trashbin.vue
Original file line number Diff line number Diff line change
Expand Up @@ -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()) {
Expand All @@ -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',
Expand Down

0 comments on commit 5b5162b

Please sign in to comment.