Skip to content

Commit

Permalink
Merge pull request #1873 from nextcloud/fix/1803/trashbin
Browse files Browse the repository at this point in the history
Don't break trashbin if calendar is undefined
  • Loading branch information
raimund-schluessler committed Dec 5, 2021
2 parents 861144e + de65039 commit 7c89de7
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/components/AppNavigation/Trashbin.vue
Original file line number Diff line number Diff line change
Expand Up @@ -158,7 +158,7 @@ export default {
} catch (e) {
// ignore
}
let subline = vobject.calendar.displayName
let subline = vobject.calendar?.displayName || t('tasks', 'Unknown calendar')
if (vobject.isEvent) {
const event = vobject?.calendarComponent.getFirstComponent('VEVENT')
if (event?.startDate.jsDate && event?.isAllDay()) {
Expand All @@ -168,8 +168,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 7c89de7

Please sign in to comment.