X-Git-Url: https://scripts.mit.edu/gitweb/autoinstalls/wordpress.git/blobdiff_plain/0459461f9ea42e0b090759ff6fe5f48360bef750..784f914b1e4b1c62d6657e86397c2e83bcee4295:/wp-content/themes/twentyfifteen/js/functions.js diff --git a/wp-content/themes/twentyfifteen/js/functions.js b/wp-content/themes/twentyfifteen/js/functions.js index 9adad87e..2da5cbc3 100644 --- a/wp-content/themes/twentyfifteen/js/functions.js +++ b/wp-content/themes/twentyfifteen/js/functions.js @@ -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; }