Commit a9f175d9 authored by Cliff Li's avatar Cliff Li
Browse files

Fix fetching of past events

parent 64a7500a
......@@ -115,10 +115,6 @@ export default class EventList extends FilteredListPage {
const openRegistrationList = [];
const upcomingList = [];
console.log(controller.openRegistrationEvents.length);
console.log(controller.upcomingEvents.length);
console.log(controller.pastEvents.length);
if (controller.openRegistrationEvents.length > 0) {
openRegistrationList.push(
m('div.list-header', m('h4', i18n('events.header_open_registration'))),
......
......@@ -22,7 +22,8 @@ async function getData(state) {
const events = await state.eventController.upcomingEvents.getPageData(1);
if (events.length < 3) {
const pastEvents = await state.eventController.pastEvents.getPageData(1);
for (let i = events.length; i < 3; i += 1) events.push(pastEvents[0]);
const { length } = events;
for (let i = 0; i < 3 - length; i += 1) events.push(pastEvents[i]);
}
const jobs = await state.jobOfferController.getPageData(1);
return { ...{ events }, ...{ jobs } };
......
......@@ -27,7 +27,6 @@ export default class studydocNew {
}
validate() {
console.log(this.doc.type);
this.isValid = this.doc.files && this.doc.files.length > 0 && this.doc.type !== null;
}
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment