diff --git a/core/index.js b/core/index.js index 793a3fdf..6ee8ce25 100644 --- a/core/index.js +++ b/core/index.js @@ -224,6 +224,7 @@ async function determineCurrentReleasePhase(now, dates = {}) { async function parseOptions(options) { // set up our defaults const parsedOptions = { + fetch: globalThis.fetch, now: DateTime.now(), urls: { index: 'https://nodejs.org/dist/index.json', @@ -233,7 +234,9 @@ async function parseOptions(options) { }; // allow the end-user to replace our fetch implementation with another one they prefer. - parsedOptions.fetch = await Promise.resolve(options?.fetch ?? globalThis.fetch); + if (options?.fetch) { + parsedOptions.fetch = options.fetch; + } // allow the end-user to provide a custom DateTime. This is particularly useful for tests. if (options?.now) {