[calendar] sort events by level

This commit is contained in:
Avris 2021-08-18 18:59:41 +02:00
parent 2118f21802
commit 73bfa161a9
1 changed files with 4 additions and 0 deletions

View File

@ -119,5 +119,9 @@ export class Calendar {
this.eventsByDate[k].push(event);
}
}
for (let date in this.eventsByDate) {
if (!this.eventsByDate.hasOwnProperty(date)) { continue; }
this.eventsByDate[date].sort((a, b) => b.level - a.level);
}
}
}