mirror of
https://github.com/MichMich/MagicMirror.git
synced 2025-07-10 01:04:28 +00:00
Merge pull request #2210 from rejas/issue-2022_catch-ical-parsing-errors
Catch errors when parsing calendar data with ical
This commit is contained in:
commit
667be460e5
@ -36,6 +36,7 @@ _This release is scheduled to be released on 2021-01-01._
|
||||
- Fix calendar when no DTEND record found in event, startDate overlay when endDate set (#2177)
|
||||
- Fix console.debug not having timestamps (#2199)
|
||||
- Fix calendar full day event east of UTC start time (#2200)
|
||||
- Catch errors when parsing calendar data with ical (#2022)
|
||||
- Corrected logic for timeFormat "relative" and "absolute"
|
||||
|
||||
## [2.13.0] - 2020-10-01
|
||||
|
@ -76,7 +76,16 @@ const CalendarFetcher = function (url, reloadInterval, excludedEvents, maximumEn
|
||||
return;
|
||||
}
|
||||
|
||||
const data = ical.parseICS(requestData);
|
||||
let data = [];
|
||||
|
||||
try {
|
||||
data = ical.parseICS(requestData);
|
||||
} catch (error) {
|
||||
fetchFailedCallback(self, error.message);
|
||||
scheduleTimer();
|
||||
return;
|
||||
}
|
||||
|
||||
const newEvents = [];
|
||||
|
||||
// limitFunction doesn't do much limiting, see comment re: the dates array in rrule section below as to why we need to do the filtering ourselves
|
||||
|
Loading…
x
Reference in New Issue
Block a user