From 1cd26fc759c177647203a7c36ddc6326a0c9221f Mon Sep 17 00:00:00 2001 From: kborchers Date: Mon, 6 Feb 2012 15:16:08 -0600 Subject: Menu: Make sure the next element is defined in addition to checking length != 0 --- ui/jquery.ui.menu.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ui/jquery.ui.menu.js b/ui/jquery.ui.menu.js index ee146732b..45be5edcf 100644 --- a/ui/jquery.ui.menu.js +++ b/ui/jquery.ui.menu.js @@ -455,7 +455,7 @@ $.widget( "ui.menu", { next = this.active[ direction + "All" ]( ".ui-menu-item" ).not( ".ui-state-disabled" ).eq( 0 ); } } - if ( !next.length || !this.active ) { + if ( !next || !next.length || !this.active ) { next = this.activeMenu.children( ".ui-menu-item" )[ filter ](); } -- cgit v1.2.3