Skip to content

Commit

Permalink
Merge pull request #2904 from nextcloud/fix/catch-invalid-calendar-ob…
Browse files Browse the repository at this point in the history
…ject

Catch invalid calendar objects
  • Loading branch information
ChristophWurst authored Feb 23, 2021
2 parents b7d534f + 95dbc84 commit 85f82bd
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions src/store/calendars.js
Original file line number Diff line number Diff line change
Expand Up @@ -688,9 +688,13 @@ const actions = {
const calendarObjects = []
const calendarObjectIds = []
for (const r of response.concat(responseTodo)) {
const calendarObject = mapCDavObjectToCalendarObject(r, calendar.id)
calendarObjects.push(calendarObject)
calendarObjectIds.push(calendarObject.id)
try {
const calendarObject = mapCDavObjectToCalendarObject(r, calendar.id)
calendarObjects.push(calendarObject)
calendarObjectIds.push(calendarObject.id)
} catch (e) {
console.error('could not convert calendar object', e)
}
}

context.commit('appendCalendarObjects', { calendarObjects })
Expand Down

0 comments on commit 85f82bd

Please sign in to comment.