File tree Expand file tree Collapse file tree 1 file changed +1
-1
lines changed Expand file tree Collapse file tree 1 file changed +1
-1
lines changed Original file line number Diff line number Diff 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 ) {
You can’t perform that action at this time.
0 commit comments