Make linter happy

This commit is contained in:
Henri Bergius 2017-12-08 18:48:55 +01:00
parent cd5aef5c23
commit 7d58465d73

View file

@ -36,10 +36,12 @@ function getEvents(number, callback) {
.then(res => res.json())
.then((res) => {
const launches = res.launches.map((launch) => {
const start = new Date(launch.windowstart);
const end = new Date(launch.windowend);
return {
allDay: false,
start: new Date(launch.windowstart).toISOString(),
end: new Date(launch.windowend).toISOString(),
start: start.toISOString(),
end: end.toISOString(),
title: launch.name,
id: launch.lsp.abbrev,
type: 'launch',
@ -55,10 +57,9 @@ function getEvents(number, callback) {
}
return 0;
});
console.log(events.slice(0, number));
return callback(events.slice(0, number));
})
.catch((e) => {
.catch(() => {
const events = current.concat(upcoming);
events.sort((a, b) => {
if (a.start < b.start) {