Changeset 24800
- Timestamp:
- 07/27/2013 07:09:05 AM (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-includes/js/media-models.js
r24771 r24800 402 402 attachments.on( 'add change remove', this._validateHandler, this ); 403 403 attachments.on( 'reset', this._validateAllHandler, this ); 404 405 404 this.validateAll( attachments ); 406 405 return this; … … 488 487 489 488 return _.map( resp, function( attrs ) { 490 var id, attachment; 489 var id, attachment, newAttributes; 490 491 491 if ( attrs instanceof Backbone.Model ) { 492 492 id = attrs.get( 'id' ); … … 496 496 } 497 497 498 attachment = Attachment.get( attrs.id ); 499 if ( ! _.isEqual( attachment.attributes, attrs ) ) 500 attachment.set( attachment.parse( attrs, xhr ) ); 498 attachment = Attachment.get( id ); 499 newAttributes = attachment.parse( attrs, xhr ); 500 501 if ( ! _.isEqual( attachment.attributes, newAttributes ) ) 502 attachment.set( newAttributes ); 501 503 502 504 return attachment;
Note: See TracChangeset
for help on using the changeset viewer.