Make WordPress Core

Ticket #34033: 34033-2.diff

File 34033-2.diff, 633 bytes (added by tywayne, 10 years ago)

Patch for Twenty Fourteen

  • src/wp-content/themes/twentyfourteen/js/functions.js

     
    1616
    1717        // Enable menu toggle for small screens.
    1818        ( function() {
    19                 if ( ! nav || ! button ) {
     19                if ( ! nav.length || ! button.length ) {
    2020                        return;
    2121                }
    2222
    2323                // Hide button if menu is missing or empty.
    24                 if ( ! menu || ! menu.children().length ) {
     24                if ( ! menu.length || ! menu.children().length ) {
    2525                        button.hide();
    2626                        return;
    2727                }