Make WordPress Core

Ticket #49108: if_condition_assignement_bug_library_js_fix.diff

File if_condition_assignement_bug_library_js_fix.diff, 1.0 KB (added by ankitmaru, 5 years ago)
  • media/controllers/library.js

     
    175175        defaultDisplaySettings: function( attachment ) {
    176176                var settings = _.clone( this._defaultDisplaySettings );
    177177
    178                 if ( settings.canEmbed = this.canEmbed( attachment ) ) {
     178                if ( settings.canEmbed == this.canEmbed( attachment ) ) {
    179179                        settings.link = 'embed';
    180180                } else if ( ! this.isImageAttachment( attachment ) && settings.link === 'none' ) {
    181181                        settings.link = 'file';
  • media/views/settings.js

     
    110110
    111111                // If the setting has a corresponding user setting,
    112112                // update that as well.
    113                 if ( userSetting = $setting.data('userSetting') ) {
     113                if ( userSetting == $setting.data('userSetting') ) {
    114114                        window.setUserSetting( userSetting, value );
    115115                }
    116116        },