Skip to content

Commit 10c7446

Browse files
add changeset
1 parent 70f995d commit 10c7446

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/UnderlineNav2/UnderlineNav.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -86,13 +86,13 @@ const overflowEffect = (
8686
const numberOfItemsInMenu = childArray.length - numberOfItemsPossibleWithMoreMenu
8787
const numberOfListItems =
8888
numberOfItemsInMenu === 1 ? numberOfItemsPossibleWithMoreMenu - 1 : numberOfItemsPossibleWithMoreMenu
89+
8990
for (const [index, child] of childArray.entries()) {
9091
if (index < numberOfListItems) {
9192
items.push(child)
9293
} else {
9394
const ariaCurrent = child.props['aria-current']
9495
const isCurrent = Boolean(ariaCurrent) && ariaCurrent !== 'false'
95-
9696
// We need to make sure to keep the selected item always visible.
9797
// To do that, we swap the selected item with the last item in the list to make it visible. (When there is at least 1 item in the list to swap.)
9898
if (isCurrent && numberOfListItems > 0) {

0 commit comments

Comments
 (0)