Changeset 3734 for sites/trunk/wordpress.org/public_html/wp-content/themes/pub/wporg-plugins/js/client/api.js
- Timestamp:
- 07/28/2016 10:55:18 PM (8 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
sites/trunk/wordpress.org/public_html/wp-content/themes/pub/wporg-plugins/js/client/api.js
r3701 r3734 56 56 this.lastRequest.isLoading = false; 57 57 58 if ( xhr.status === 0) {59 if ( xhr.statusText === 'abort') {58 if ( 0 === xhr.status ) { 59 if ( 'abort' === xhr.statusText ) { 60 60 // Has been aborted 61 61 return; … … 68 68 this.lastRequest.data = err.responseJSON[0]; 69 69 70 if ( !callback ) {71 return;70 if ( callback ) { 71 callback( null, err.responseJSON[0] ); 72 72 } 73 74 callback( null, err.responseJSON[0] );75 73 } else { 76 window. alert( err.statusText );74 window.console.error( err.statusText ); 77 75 } 78 76 } );
Note: See TracChangeset
for help on using the changeset viewer.