Fix current event listing
This commit is contained in:
parent
31cf1a696b
commit
faf6a924ba
1 changed files with 4 additions and 1 deletions
|
@ -6,7 +6,10 @@ function getEvents(number) {
|
||||||
const allEvents = window.c_base_events.concat(window.c_base_regulars);
|
const allEvents = window.c_base_events.concat(window.c_base_regulars);
|
||||||
const current = allEvents.filter((event) => {
|
const current = allEvents.filter((event) => {
|
||||||
const start = new Date(event.start);
|
const start = new Date(event.start);
|
||||||
const end = new Date(event.start);
|
if (!event.end) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
const end = new Date(event.end);
|
||||||
if (start > now) {
|
if (start > now) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue