File tree 1 file changed +15
-11
lines changed
debug_toolbar/static/debug_toolbar/js
1 file changed +15
-11
lines changed Original file line number Diff line number Diff line change @@ -322,17 +322,21 @@ const djdt = {
322
322
const origFetch = window . fetch ;
323
323
window . fetch = function ( ...args ) {
324
324
const promise = origFetch . apply ( this , args ) ;
325
- promise . then ( ( response ) => {
326
- if ( response . headers . get ( "djdt-store-id" ) !== null ) {
327
- handleAjaxResponse ( response . headers . get ( "djdt-store-id" ) ) ;
328
- }
329
- // Don't resolve the response via .json(). Instead
330
- // continue to return it to allow the caller to consume as needed.
331
- return response ;
332
- } ) . catch ( ( err ) => {
333
- if ( err . name === 'AbortError' ) return
334
- throw ( e ) ;
335
- } ) ;
325
+ promise
326
+ . then ( ( response ) => {
327
+ if ( response . headers . get ( "djdt-store-id" ) !== null ) {
328
+ handleAjaxResponse (
329
+ response . headers . get ( "djdt-store-id" )
330
+ ) ;
331
+ }
332
+ // Don't resolve the response via .json(). Instead
333
+ // continue to return it to allow the caller to consume as needed.
334
+ return response ;
335
+ } )
336
+ . catch ( ( err ) => {
337
+ if ( err . name === "AbortError" ) return ;
338
+ throw e ;
339
+ } ) ;
336
340
return promise ;
337
341
} ;
338
342
} ,
You can’t perform that action at this time.
0 commit comments