Make WordPress Core

Ticket #27537: 27537-01.patch

File 27537-01.patch, 898 bytes (added by gcorne, 11 years ago)
  • src/wp-includes/js/media-views.js

    diff --git src/wp-includes/js/media-views.js src/wp-includes/js/media-views.js
    index be0ee8f..86d0b6d 100644
     
    59305930                render: function() {
    59315931                        var self = this,
    59325932                                args = arguments;
     5933
     5934                       
    59335935                        if ( this.model.attachment && 'pending' === this.model.dfd.state() ) {
    5934                                 // should instead show a spinner when the attachment is new and then add a listener that updates on change
    59355936                                this.model.dfd.done( function() {
    59365937                                        media.view.Settings.AttachmentDisplay.prototype.render.apply( self, args );
    59375938                                        self.resetFocus();
     5939                                } ).fail( function() {
     5940                                        self.model.attachment = false;
     5941                                        media.view.Settings.AttachmentDisplay.prototype.render.apply( self, args );
     5942                                        self.resetFocus();
    59385943                                } );
    59395944                        } else {
    59405945                                media.view.Settings.AttachmentDisplay.prototype.render.apply( this, arguments );