Skip to content

Commit

Permalink
fix global fetch problem
Browse files Browse the repository at this point in the history
  • Loading branch information
unnoq committed Dec 29, 2024
1 parent 2d3984c commit cf93dd0
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/client/src/adapters/fetch/orpc-link.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ export class ORPCLink<TClientContext> implements ClientLink<TClientContext> {
private readonly payloadCodec: PublicORPCPayloadCodec

constructor(private readonly options: ORPCLinkOptions<TClientContext>) {
this.fetch = options.fetch ?? fetch
this.fetch = options.fetch ?? globalThis.fetch.bind(globalThis)
this.payloadCodec = options.payloadCodec ?? new ORPCPayloadCodec()
}

Expand Down

0 comments on commit cf93dd0

Please sign in to comment.