Skip to content

Commit 1cd26fc

Browse files
committed
Menu: Make sure the next element is defined in addition to checking length != 0
1 parent 3ef4db2 commit 1cd26fc

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

ui/jquery.ui.menu.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -455,7 +455,7 @@ $.widget( "ui.menu", {
455455
next = this.active[ direction + "All" ]( ".ui-menu-item" ).not( ".ui-state-disabled" ).eq( 0 );
456456
}
457457
}
458-
if ( !next.length || !this.active ) {
458+
if ( !next || !next.length || !this.active ) {
459459
next = this.activeMenu.children( ".ui-menu-item" )[ filter ]();
460460
}
461461

0 commit comments

Comments
 (0)