Menus: Use strict comparison for the condition added in [38612].

See #37846.

git-svn-id: https://develop.svn.wordpress.org/trunk@38613 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Pascal Birchler 2016-09-15 16:55:19 +00:00
parent 98e386c6f9
commit a803a33c04
1 changed files with 4 additions and 1 deletions

View File

@ -84,10 +84,13 @@ var wpNavMenu;
var t = $(this),
depth = t.menuItemDepth(),
newDepth = depth + change;
t.removeClass( 'menu-item-depth-'+ depth )
.addClass( 'menu-item-depth-'+ ( newDepth ) );
if ( newDepth == 0 )
if ( 0 === newDepth ) {
t.find( '.is-submenu' ).hide();
}
});
},
childMenuItems : function() {