diff --git a/packages/gaxios/src/gaxios.ts b/packages/gaxios/src/gaxios.ts index 2df23b4c0..01cc032ab 100644 --- a/packages/gaxios/src/gaxios.ts +++ b/packages/gaxios/src/gaxios.ts @@ -672,7 +672,7 @@ export class Gaxios implements FetchCompliance { this.#fetch ||= hasWindow ? window.fetch - : (await import('node-fetch')).default; + : (typeof globalThis.fetch === 'function' ? globalThis.fetch : (await import('node-fetch')).default); return this.#fetch; }