mirror of
https://github.com/MichMich/MagicMirror.git
synced 2025-06-27 11:50:00 +00:00
Surround ical parsing with try/catch to catch unknown bugs
This commit is contained in:
parent
6c3100e250
commit
ccf98c0c22
@ -76,7 +76,16 @@ const CalendarFetcher = function (url, reloadInterval, excludedEvents, maximumEn
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
const data = ical.parseICS(requestData);
|
let data = [];
|
||||||
|
|
||||||
|
try {
|
||||||
|
data = ical.parseICS(requestData);
|
||||||
|
} catch (error) {
|
||||||
|
fetchFailedCallback(self, error.message);
|
||||||
|
scheduleTimer();
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
const newEvents = [];
|
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
|
// 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