Simplify return call to make a better diff

This commit is contained in:
rejas 2020-06-20 08:45:03 +02:00
parent b2f71a2ce1
commit 53363b0618

View File

@ -51,10 +51,13 @@ const CalendarFetcher = function (url, reloadInterval, excludedEvents, maximumEn
if (err) {
fetchFailedCallback(self, err);
scheduleTimer();
return;
} else if (r.statusCode !== 200) {
fetchFailedCallback(self, r.statusCode + ": " + r.statusMessage);
scheduleTimer();
} else {
return;
}
const data = ical.parseICS(requestData);
const newEvents = [];
@ -330,7 +333,6 @@ const CalendarFetcher = function (url, reloadInterval, excludedEvents, maximumEn
self.broadcastEvents();
scheduleTimer();
}
});
};