Twenty Thirteen, Twenty Fourteen and Twenty Fifteen: Fixes insufficient check for existence of DOM elements in jQuery object
Fixes #34033 Props: tywayne git-svn-id: https://develop.svn.wordpress.org/trunk@36999 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
parent
eb0268dbe7
commit
6bc7b7c066
@ -49,7 +49,7 @@
|
||||
// Enable menu toggle for small screens.
|
||||
( function() {
|
||||
var menu, widgets, social;
|
||||
if ( ! secondary || ! button ) {
|
||||
if ( ! secondary.length || ! button.length ) {
|
||||
return;
|
||||
}
|
||||
|
||||
@ -57,7 +57,7 @@
|
||||
menu = secondary.find( '.nav-menu' );
|
||||
widgets = secondary.find( '#widget-area' );
|
||||
social = secondary.find( '#social-navigation' );
|
||||
if ( ! widgets.length && ! social.length && ( ! menu || ! menu.children().length ) ) {
|
||||
if ( ! widgets.length && ! social.length && ( ! menu.length || ! menu.children().length ) ) {
|
||||
button.hide();
|
||||
return;
|
||||
}
|
||||
|
@ -16,12 +16,12 @@
|
||||
|
||||
// Enable menu toggle for small screens.
|
||||
( function() {
|
||||
if ( ! nav || ! button ) {
|
||||
if ( ! nav.length || ! button.length ) {
|
||||
return;
|
||||
}
|
||||
|
||||
// Hide button if menu is missing or empty.
|
||||
if ( ! menu || ! menu.children().length ) {
|
||||
if ( ! menu.length || ! menu.children().length ) {
|
||||
button.hide();
|
||||
return;
|
||||
}
|
||||
|
@ -34,12 +34,12 @@
|
||||
* Enables menu toggle for small screens.
|
||||
*/
|
||||
( function() {
|
||||
if ( ! nav || ! button ) {
|
||||
if ( ! nav.length || ! button.length ) {
|
||||
return;
|
||||
}
|
||||
|
||||
// Hide button if menu is missing or empty.
|
||||
if ( ! menu || ! menu.children().length ) {
|
||||
if ( ! menu.length || ! menu.children().length ) {
|
||||
button.hide();
|
||||
return;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user