Fix scroll to for groups not working
This commit is contained in:
parent
39d0635afc
commit
0c830b3edf
|
|
@ -77,12 +77,12 @@ export function FavoriteBar({teams}) {
|
||||||
const groupElements = document.querySelectorAll('[data-teams]');
|
const groupElements = document.querySelectorAll('[data-teams]');
|
||||||
const scrollToNotFound = null;
|
const scrollToNotFound = null;
|
||||||
|
|
||||||
groupElements.forEach(groupEl => {
|
for (const groupEl of groupElements) {
|
||||||
const teamIds = groupEl.getAttribute('data-teams').split(',').map(id => parseInt(id, 10));
|
const teamIds = groupEl.getAttribute('data-teams').split(',').map(id => parseInt(id, 10));
|
||||||
if (teamIds.includes(favoriteId)) {
|
if (teamIds.includes(favoriteId)) {
|
||||||
return groupEl;
|
return groupEl;
|
||||||
}
|
}
|
||||||
});
|
}
|
||||||
|
|
||||||
return scrollToNotFound;
|
return scrollToNotFound;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue