Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nextcloud/tasks.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorRaimund Schlüßler <raimund.schluessler@mailbox.org>2021-12-05 00:37:36 +0300
committerRaimund Schlüßler <raimund.schluessler@mailbox.org>2021-12-05 00:37:36 +0300
commitde65039fe6588ff30bfd5d19dbada4277b04f340 (patch)
treefe2acc5c509f91adc0f3f9a2641db3093033c994 /src
parent217b67073dda1e46c25efc9f79844c770541c557 (diff)
Don't break trashbin if calendar is undefined
Signed-off-by: Raimund Schlüßler <raimund.schluessler@mailbox.org>
Diffstat (limited to 'src')
-rw-r--r--src/components/AppNavigation/Trashbin.vue6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/components/AppNavigation/Trashbin.vue b/src/components/AppNavigation/Trashbin.vue
index bffc1abf..828cf8b8 100644
--- a/src/components/AppNavigation/Trashbin.vue
+++ b/src/components/AppNavigation/Trashbin.vue
@@ -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()) {
@@ -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',