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:
parent
aaee49fb63
commit
83defdf556
@ -175,7 +175,8 @@ Library = wp.media.controller.State.extend(/** @lends wp.media.controller.Librar
|
|||||||
defaultDisplaySettings: function( attachment ) {
|
defaultDisplaySettings: function( attachment ) {
|
||||||
var settings = _.clone( this._defaultDisplaySettings );
|
var settings = _.clone( this._defaultDisplaySettings );
|
||||||
|
|
||||||
if ( settings.canEmbed = this.canEmbed( attachment ) ) {
|
settings.canEmbed = this.canEmbed( attachment );
|
||||||
|
if ( settings.canEmbed ) {
|
||||||
settings.link = 'embed';
|
settings.link = 'embed';
|
||||||
} else if ( ! this.isImageAttachment( attachment ) && settings.link === 'none' ) {
|
} else if ( ! this.isImageAttachment( attachment ) && settings.link === 'none' ) {
|
||||||
settings.link = 'file';
|
settings.link = 'file';
|
||||||
|
Loading…
Reference in New Issue
Block a user