WordPress.org

Make WordPress Core

Changeset 24601


Ignore:
Timestamp:
07/09/2013 07:11:43 AM (7 years ago)
Author:
koopersmith
Message:

Revisions: Use toggleClass instead of a conditional. See #24425.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-admin/js/revisions.js

    r24600 r24601  
    279279
    280280        updateCompareTwoMode: function() {
    281             if ( this.model.get( 'compareTwoMode' ) )
    282                 this.$el.addClass( 'comparing-two-revisions' );
    283             else
    284                 this.$el.removeClass( 'comparing-two-revisions' );
     281            this.$el.toggleClass( 'comparing-two-revisions', this.model.get('compareTwoMode') );
    285282        }
    286283    });
Note: See TracChangeset for help on using the changeset viewer.