Make WordPress Core

Ticket #58973: 58973.followup.diff

File 58973.followup.diff, 939 bytes (added by joedolson, 13 months ago)

Follow up patch

  • src/js/media/controllers/state.js

     
    165165        _menu: function() {
    166166                var menu = this.frame.menu,
    167167                        mode = this.get('menu'),
     168                        actionMenuItems,
     169                        actionMenuLength,
     170                        view;
     171
     172                if ( this.frame.menu ) {
    168173                        actionMenuItems = this.frame.menu.get('views'),
    169174                        actionMenuLength = actionMenuItems ? actionMenuItems.views.get().length : 0,
    170                         view;
    171 
    172                 // Show action menu only if it is active and has more than one default element.
    173                 this.frame.$el.toggleClass( 'hide-menu', ! mode || actionMenuLength < 2 );
     175                        // Show action menu only if it is active and has more than one default element.
     176                        this.frame.$el.toggleClass( 'hide-menu', ! mode || actionMenuLength < 2 );
     177                }
    174178                if ( ! mode ) {
    175179                        return;
    176180                }