[F.END] Avoid empty categories
This commit is contained in:
parent
78483e17ea
commit
1b0894b74d
|
@ -96,12 +96,14 @@ function zerocalcareDisplay() {
|
|||
eventElement.appendChild(dateElement);
|
||||
eventElement.appendChild(timeElement);
|
||||
eventElement.appendChild(locationElement);
|
||||
|
||||
if ('Corsi' in json_obj[i]['CATEGORIES']) {
|
||||
eventsContainer[Corsi].appendChild(eventElement);
|
||||
}
|
||||
else {
|
||||
coursesContainer[Eventi].appendChild(eventElement);
|
||||
|
||||
if (typeof json_obj[i]['CATEGORIES'] === 'object') {
|
||||
if ('Corsi' in json_obj[i]['CATEGORIES']) {
|
||||
eventsContainer[Corsi].appendChild(eventElement);
|
||||
}
|
||||
else {
|
||||
coursesContainer[Eventi].appendChild(eventElement);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue