Menu: Check that there is an active item in _activate()

Closes gh-1606
This commit is contained in:
Rand Scullard
2015-09-28 16:15:46 -04:00
committed by Scott González
parent 623b64eefc
commit d21aeee809

View File

@@ -270,7 +270,7 @@ return $.widget( "ui.menu", {
},
_activate: function( event ) {
if ( !this.active.is( ".ui-state-disabled" ) ) {
if ( this.active && !this.active.is( ".ui-state-disabled" ) ) {
if ( this.active.children( "[aria-haspopup='true']" ).length ) {
this.expand( event );
} else {