Merge pull request #6788 from MontejoJorge/fix/render-upcoming

This commit is contained in:
Bill Thornton
2025-05-14 08:49:33 -04:00
committed by GitHub
+6 -8
View File
@@ -45,7 +45,7 @@ function enableScrollX() {
function renderUpcoming(elem, items) {
const groups = [];
let currentGroupName = '';
let currentGroupName;
let currentGroup = [];
for (let i = 0, length = items.length; i < length; i++) {
@@ -66,15 +66,13 @@ function renderUpcoming(elem, items) {
}
if (dateText != currentGroupName) {
if (currentGroup.length) {
groups.push({
name: currentGroupName,
items: currentGroup
});
}
currentGroupName = dateText;
currentGroup = [item];
groups.push({
name: currentGroupName,
items: currentGroup
});
} else {
currentGroup.push(item);
}