Coding Standards: Move assignment out of condition in `js/media/controllers/library.js`.

Props ankitmaru.
Fixes #49108.

git-svn-id: https://develop.svn.wordpress.org/trunk@47030 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Sergey Biryukov 2020-01-02 12:05:29 +00:00
parent aaee49fb63
commit 83defdf556
1 changed files with 2 additions and 1 deletions

View File

@ -175,7 +175,8 @@ Library = wp.media.controller.State.extend(/** @lends wp.media.controller.Librar
defaultDisplaySettings: function( attachment ) {
var settings = _.clone( this._defaultDisplaySettings );
if ( settings.canEmbed = this.canEmbed( attachment ) ) {
settings.canEmbed = this.canEmbed( attachment );
if ( settings.canEmbed ) {
settings.link = 'embed';
} else if ( ! this.isImageAttachment( attachment ) && settings.link === 'none' ) {
settings.link = 'file';