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.


Built from https://develop.svn.wordpress.org/trunk@27477


git-svn-id: http://core.svn.wordpress.org/trunk@27321 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
Scott Taylor 2014-03-09 01:06:14 +00:00
parent dc00fc7e7f
commit f0863476f5
2 changed files with 5 additions and 5 deletions

View File

@ -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 );
} );
}
});

File diff suppressed because one or more lines are too long