mirror of
https://github.com/MichMich/MagicMirror.git
synced 2025-07-01 21:43:26 +00:00
Simplify return call to make a better diff
This commit is contained in:
parent
b2f71a2ce1
commit
53363b0618
@ -51,10 +51,13 @@ const CalendarFetcher = function (url, reloadInterval, excludedEvents, maximumEn
|
|||||||
if (err) {
|
if (err) {
|
||||||
fetchFailedCallback(self, err);
|
fetchFailedCallback(self, err);
|
||||||
scheduleTimer();
|
scheduleTimer();
|
||||||
|
return;
|
||||||
} else if (r.statusCode !== 200) {
|
} else if (r.statusCode !== 200) {
|
||||||
fetchFailedCallback(self, r.statusCode + ": " + r.statusMessage);
|
fetchFailedCallback(self, r.statusCode + ": " + r.statusMessage);
|
||||||
scheduleTimer();
|
scheduleTimer();
|
||||||
} else {
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
const data = ical.parseICS(requestData);
|
const data = ical.parseICS(requestData);
|
||||||
const newEvents = [];
|
const newEvents = [];
|
||||||
|
|
||||||
@ -330,7 +333,6 @@ const CalendarFetcher = function (url, reloadInterval, excludedEvents, maximumEn
|
|||||||
|
|
||||||
self.broadcastEvents();
|
self.broadcastEvents();
|
||||||
scheduleTimer();
|
scheduleTimer();
|
||||||
}
|
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user