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