File tree Expand file tree Collapse file tree 1 file changed +6
-1
lines changed Expand file tree Collapse file tree 1 file changed +6
-1
lines changed Original file line number Diff line number Diff line change @@ -475,7 +475,6 @@ export class MemuClient {
475
475
console . log ( `Making ${ config . method ?. toUpperCase ( ) } request to ${ url } (attempt ${ attempt + 1 } )` )
476
476
477
477
const response = await fetch ( url , {
478
- signal : this . timeout ? AbortSignal . timeout ( this . timeout ) : undefined ,
479
478
...config ,
480
479
headers : {
481
480
'Accept' : 'application/json' ,
@@ -484,6 +483,12 @@ export class MemuClient {
484
483
'User-Agent' : 'MemU-JavaScript-SDK/0.1.11' ,
485
484
...config . headers ,
486
485
} ,
486
+ signal : this . timeout
487
+ // eslint-disable-next-line sonarjs/no-nested-conditional
488
+ ? config . signal
489
+ ? AbortSignal . any ( [ config . signal , AbortSignal . timeout ( this . timeout ) ] )
490
+ : AbortSignal . timeout ( this . timeout )
491
+ : undefined ,
487
492
} )
488
493
489
494
// Handle HTTP status codes
You can’t perform that action at this time.
0 commit comments