Skip to content

Commit 056ce81

Browse files
committed
fix: compatible with the custom opts.fetch
1 parent b247c39 commit 056ce81

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/client/sse.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@ export class SSEClientTransport implements Transport {
8181
this._url = url;
8282
this._resourceMetadataUrl = undefined;
8383

84-
const actualFetch = opts?.eventSourceInit?.fetch ?? fetch;
84+
const actualFetch = opts?.eventSourceInit?.fetch ?? opts?.fetch ?? fetch;
8585
this._eventSourceInit = {
8686
...(opts?.eventSourceInit ?? {}),
8787
fetch: (url, init) => this._commonHeaders().then((headers) => actualFetch(url, {

0 commit comments

Comments
 (0)