File tree Expand file tree Collapse file tree 1 file changed +3
-1
lines changed Expand file tree Collapse file tree 1 file changed +3
-1
lines changed Original file line number Diff line number Diff line change @@ -81,7 +81,7 @@ export function instrumentFetchRequest(
8181 if ( shouldAttachHeaders ( handlerData . fetchData . url ) ) {
8282 const request : string | Request = handlerData . args [ 0 ] ;
8383
84- const options : { [ key : string ] : unknown } = ( handlerData . args [ 1 ] = handlerData . args [ 1 ] || { } ) ;
84+ const options : { [ key : string ] : unknown } = handlerData . args [ 1 ] || { } ;
8585
8686 const headers = _addTracingHeadersToFetchRequest (
8787 request ,
@@ -92,6 +92,8 @@ export function instrumentFetchRequest(
9292 hasTracingEnabled ( ) && hasParent ? span : undefined ,
9393 ) ;
9494 if ( headers ) {
95+ // Ensure this is actually set, if no options have been passed previously
96+ handlerData . args [ 1 ] = options ;
9597 options . headers = headers ;
9698 }
9799 }
You can’t perform that action at this time.
0 commit comments