Changeset 34009
- Timestamp:
- 09/10/2015 06:18:41 PM (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-includes/js/plupload/wp-plupload.js
r30244 r34009 263 263 } 264 264 265 if ( ! _.isObject( response ) || _.isUndefined( response.success ) ) 265 if ( ! _.isObject( response ) || _.isUndefined( response.success ) ) { 266 266 return error( pluploadL10n.default_error, null, file ); 267 else if ( ! response.success ) 268 return error( response.data && response.data.message, response.data, 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 } 269 272 270 273 _.each(['file','loaded','size','percent'], function( key ) { … … 282 285 Uploader.queue.reset(); 283 286 284 self.success( file.attachment );287 self.success( file.attachment, response.data ); 285 288 }); 286 289
Note: See TracChangeset
for help on using the changeset viewer.