aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorkborchers <kris.borchers@gmail.com>2012-02-06 15:16:08 -0600
committerkborchers <kris.borchers@gmail.com>2012-02-06 15:16:08 -0600
commit1cd26fc759c177647203a7c36ddc6326a0c9221f (patch)
treebeb91e59658d9532afdc18d8ef2bcc6613a5aeda
parent3ef4db267040844d7a36165c9fa72e77e9118429 (diff)
downloadjquery-ui-1cd26fc759c177647203a7c36ddc6326a0c9221f.tar.gz
jquery-ui-1cd26fc759c177647203a7c36ddc6326a0c9221f.zip
Menu: Make sure the next element is defined in addition to checking length != 0
-rw-r--r--ui/jquery.ui.menu.js2
1 files changed, 1 insertions, 1 deletions
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 ]();
}