From ed7fc2132f9af6415300ca0ca0c59fee31bdf04a Mon Sep 17 00:00:00 2001 From: Matt Brophy Date: Thu, 27 Jun 2024 11:07:07 -0400 Subject: [PATCH] Remove polyfil.io reference from warning message --- .changeset/flat-seals-hunt.md | 5 +++++ packages/react-router-dom/index.tsx | 6 +----- 2 files changed, 6 insertions(+), 5 deletions(-) create mode 100644 .changeset/flat-seals-hunt.md diff --git a/.changeset/flat-seals-hunt.md b/.changeset/flat-seals-hunt.md new file mode 100644 index 0000000000..132be24426 --- /dev/null +++ b/.changeset/flat-seals-hunt.md @@ -0,0 +1,5 @@ +--- +"react-router-dom": patch +--- + +Remove `polyfill.io` reference from warning message because the domain was sold and has since been determined to serve malware. See https://sansec.io/research/polyfill-supply-chain-attack. diff --git a/packages/react-router-dom/index.tsx b/packages/react-router-dom/index.tsx index e6fcd306ea..77e6727e9e 100644 --- a/packages/react-router-dom/index.tsx +++ b/packages/react-router-dom/index.tsx @@ -1464,11 +1464,7 @@ export function useSearchParams( `You cannot use the \`useSearchParams\` hook in a browser that does not ` + `support the URLSearchParams API. If you need to support Internet ` + `Explorer 11, we recommend you load a polyfill such as ` + - `https://github.com/ungap/url-search-params\n\n` + - `If you're unsure how to load polyfills, we recommend you check out ` + - `https://polyfill.io/v3/ which provides some recommendations about how ` + - `to load polyfills only for users that need them, instead of for every ` + - `user.` + `https://github.com/ungap/url-search-params.` ); let defaultSearchParamsRef = React.useRef(createSearchParams(defaultInit));