mirror of
git://develop.git.wordpress.org/
synced 2025-02-25 17:13:30 +01: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:
parent
67512aa18a
commit
8064f5dbc4
@ -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 );
|
||||
} );
|
||||
}
|
||||
});
|
||||
|
Loading…
x
Reference in New Issue
Block a user