Skip to content

Commit 670f650

Browse files
committed
Menu: Ensure an event was passed before checking its type. Fixes #9384 - Menu: _focus function forgets null check with doing a pattern match on event.type
1 parent 628a141 commit 670f650

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
@@ -389,7 +389,7 @@ $.widget( "ui.menu", {
389389
}
390390

391391
nested = item.children( ".ui-menu" );
392-
if ( nested.length && ( /^mouse/.test( event.type ) ) ) {
392+
if ( nested.length && event && ( /^mouse/.test( event.type ) ) ) {
393393
this._startOpening(nested);
394394
}
395395
this.activeMenu = item.parent();

0 commit comments

Comments
 (0)