Skip to content

Commit

Permalink
Remove URLPattern ponyfill for other envs
Browse files Browse the repository at this point in the history
  • Loading branch information
ardatan committed Jan 2, 2023
1 parent c4bb71d commit 9752cca
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
5 changes: 5 additions & 0 deletions .changeset/angry-monkeys-fail.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@whatwg-node/fetch': patch
---

Remove unnecessary ponyfill for the envs supporting Fetch by default
4 changes: 0 additions & 4 deletions packages/fetch/dist/global-ponyfill.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,4 @@ module.exports.btoa = globalThis.btoa;
module.exports.TextEncoder = globalThis.TextEncoder;
module.exports.TextDecoder = globalThis.TextDecoder;
module.exports.URLPattern = globalThis.URLPattern;
if (!module.exports.URLPattern) {
const urlPatternModule = require('urlpattern-polyfill');
module.exports.URLPattern = urlPatternModule.URLPattern;
}
module.exports.createFetch = () => globalThis;

0 comments on commit 9752cca

Please sign in to comment.