File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -45,7 +45,6 @@ export default class DiffContainer extends React.Component {
4545 } ;
4646
4747 errorHandled = ( errorCode ) => {
48- console . log ( 'Error handled:' , errorCode ) ;
4948 this . setState ( { error : errorCode } ) ;
5049 } ;
5150
Original file line number Diff line number Diff line change @@ -208,15 +208,11 @@ export default class DiffView extends React.Component {
208208 url . searchParams . append ( 'b' , b ) ;
209209 fetchWithTimeout ( url , { credentials : 'include' } )
210210 . then ( checkResponse )
211- . then ( ( response ) => {
212- if ( response . status == 200 ) {
213- const data = response . json ( ) ;
214- this . setState ( {
215- diffData : data
216- } ) ;
217- } else {
218- this . _errorHandled ( error . status ) ;
219- }
211+ . then ( response => response . json ( ) )
212+ . then ( ( data ) => {
213+ this . setState ( {
214+ diffData : data
215+ } ) ;
220216 } )
221217 . catch ( error => { this . _errorHandled ( error . message ) ; } ) ;
222218 }
You can’t perform that action at this time.
0 commit comments