]> scripts.mit.edu Git - autoinstalls/wordpress.git/blobdiff - wp-content/themes/twentyfifteen/js/functions.js
WordPress 4.5
[autoinstalls/wordpress.git] / wp-content / themes / twentyfifteen / js / functions.js
index 9adad87e39ba92a0302059f39217326199809761..2da5cbc34016558e89427e0df77edbe31f36355d 100644 (file)
@@ -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;
                }