Fix scroll to for groups not working

This commit is contained in:
Daniel Schädler 2025-03-19 16:12:16 +01:00
parent 39d0635afc
commit 0c830b3edf
1 changed files with 2 additions and 2 deletions

View File

@ -77,12 +77,12 @@ export function FavoriteBar({teams}) {
const groupElements = document.querySelectorAll('[data-teams]');
const scrollToNotFound = null;
groupElements.forEach(groupEl => {
for (const groupEl of groupElements) {
const teamIds = groupEl.getAttribute('data-teams').split(',').map(id => parseInt(id, 10));
if (teamIds.includes(favoriteId)) {
return groupEl;
}
});
}
return scrollToNotFound;
}