From 5796afad2b5b25d8cdb45bf5fc91fa181910606b Mon Sep 17 00:00:00 2001 From: Lukas Elmer Date: Thu, 15 Aug 2024 19:45:27 +0200 Subject: [PATCH] Avoid loading node-fetch if global.fetch is available --- src/node-polyfill.js | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/node-polyfill.js b/src/node-polyfill.js index f0c477c6..0290c2a8 100644 --- a/src/node-polyfill.js +++ b/src/node-polyfill.js @@ -1,6 +1,5 @@ -const fetchNode = require('./node-ponyfill') - if (!global.fetch) { + const fetchNode = require('./node-ponyfill') const fetch = fetchNode.fetch.bind({}) global.fetch = fetch