WordPress.org

Make WordPress Core

Changeset 34047


Ignore:
Timestamp:
09/11/2015 06:03:22 PM (6 years ago)
Author:
wonderboymusic
Message:

Revert [34009], broke uploads.

See #24934.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-includes/js/plupload/wp-plupload.js

    r34009 r34047  
    263263            }
    264264
    265             if ( ! _.isObject( response ) || _.isUndefined( response.success ) ) {
     265            if ( ! _.isObject( response ) || _.isUndefined( response.success ) )
    266266                return error( pluploadL10n.default_error, null, file );
    267             } else if ( ! response.success && ! _.isObject( response.data ) ) {
    268                 return error( response.data, null, file );
    269             } else {
    270                 return error( response.data.message || pluploadL10n.default_error, response.data, file );
    271             }
     267            else if ( ! response.success )
     268                return error( response.data && response.data.message, response.data, file );
    272269
    273270            _.each(['file','loaded','size','percent'], function( key ) {
     
    285282                Uploader.queue.reset();
    286283
    287             self.success( file.attachment, response.data );
     284            self.success( file.attachment );
    288285        });
    289286
Note: See TracChangeset for help on using the changeset viewer.