Skip to content

Commit

Permalink
fix: use globalThis fetch
Browse files Browse the repository at this point in the history
  • Loading branch information
StephanH90 committed Oct 9, 2023
1 parent 4605e88 commit 7302860
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions ember-fetch/src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ import {
} from './errors';

let setupFetchWaiter;
let fetch;
let fetch = globalThis.fetch;

if (macroCondition(isTesting())) {
let isSetup = false;
Expand All @@ -24,7 +24,6 @@ if (macroCondition(isTesting())) {
!isSetup,
);

let fetch = globalThis.fetch;
globalThis.fetch = (...args) => waitForPromise(fetch(...args));

isSetup = true;
Expand Down

0 comments on commit 7302860

Please sign in to comment.