Skip to content

Commit

Permalink
fixup! fixup! fixup! fixup! fix: react-native runtime incompatibilities
Browse files Browse the repository at this point in the history
  • Loading branch information
nicklasl committed Oct 3, 2024
1 parent e61a70c commit cd263af
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions packages/sdk/src/fetch-util.ts
Original file line number Diff line number Diff line change
Expand Up @@ -233,7 +233,7 @@ export class FetchBuilder {
let retryCount = 0;

const doRetry = async (e: unknown): Promise<Response> => {
if (request.signal?.aborted ?? false) throw request.signal?.reason;
if (request.signal?.aborted ?? false) throw request.signal.reason;
// if there are no more attempts we throw the last error
if (retryCount >= maxRetries) throw e;

Expand Down Expand Up @@ -266,7 +266,7 @@ export class FetchBuilder {
* @returns the builder itself
*/
route(match: (url: string) => boolean, fetch: SimpleFetch) {
return this.compose(next => request => match(request.url) ? fetch(request) : next(request));
return this.compose(next => request => (match(request.url) ? fetch(request) : next(request)));
}

/**
Expand Down

0 comments on commit cd263af

Please sign in to comment.