mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2026-07-04 17:20:07 +00:00
In wp.media.model.PostAudio and wp.media.model.PostVideo, use Underscore's unset method when clearing out properties when the attachment changes.
See #27016. git-svn-id: https://develop.svn.wordpress.org/trunk@27477 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
@@ -472,11 +472,11 @@ window.wp = window.wp || {};
|
||||
if ( _.contains( wp.media.view.settings.embedExts, this.extension ) ) {
|
||||
this.set( this.extension, attachment.get( 'url' ) );
|
||||
} else {
|
||||
this.set( this.extension, '' );
|
||||
this.unset( this.extension );
|
||||
}
|
||||
|
||||
_.each( _.without( wp.media.view.settings.embedExts, this.extension ), function (ext) {
|
||||
self.set( ext, '' );
|
||||
self.unset( ext );
|
||||
} );
|
||||
}
|
||||
});
|
||||
@@ -501,11 +501,11 @@ window.wp = window.wp || {};
|
||||
if ( _.contains( wp.media.view.settings.embedExts, this.extension ) ) {
|
||||
this.set( this.extension, attachment.get( 'url' ) );
|
||||
} else {
|
||||
this.set( this.extension, '' );
|
||||
this.unset( this.extension );
|
||||
}
|
||||
|
||||
_.each( _.without( wp.media.view.settings.embedExts, this.extension ), function (ext) {
|
||||
self.set( ext, '' );
|
||||
self.unset( ext );
|
||||
} );
|
||||
}
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user