File tree Expand file tree Collapse file tree 2 files changed +2
-4
lines changed
Expand file tree Collapse file tree 2 files changed +2
-4
lines changed Original file line number Diff line number Diff line change @@ -717,7 +717,7 @@ describe("SSEClientTransport", () => {
717717 eventSourceInit : {
718718 fetch : ( url , init ) => {
719719 return fetch ( url , { ...init , headers : {
720- ...init ?. headers ,
720+ ...( init ?. headers instanceof Headers ? Object . fromEntries ( init . headers . entries ( ) ) : init ?. headers ) ,
721721 'X-Custom-Header' : 'custom-value'
722722 } } ) ;
723723 }
Original file line number Diff line number Diff line change @@ -130,9 +130,7 @@ export class SSEClientTransport implements Transport {
130130 headers . set ( "Accept" , "text/event-stream" ) ;
131131 const response = await fetchImpl ( url , {
132132 ...init ,
133- headers : {
134- ...Object . fromEntries ( headers . entries ( ) ) ,
135- }
133+ headers,
136134 } )
137135
138136 if ( response . status === 401 && response . headers . has ( 'www-authenticate' ) ) {
You can’t perform that action at this time.
0 commit comments