You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
(have not seen error with this one yet but I think it might come if the first place gets changed and this not)
My users are hitting error boundary and cannot use the web at the moment.
Full Error Stack
{
message: t.replace(...).replaceAll is not a function,
name: TypeError,
stack:
TypeError: t.replace(...).replaceAll is not a function
at a (https://www.vasekvety.sk/_next/static/chunks/296-ae496176be3b700e.js:1:7719)
at Object.e.matchesPathname (https://www.vasekvety.sk/_next/static/chunks/296-ae496176be3b700e.js:1:8149)
at https://www.vasekvety.sk/_next/static/chunks/296-ae496176be3b700e.js:1:6444
at Array.find (<anonymous>)
at Object.e.getRoute (https://www.vasekvety.sk/_next/static/chunks/296-ae496176be3b700e.js:1:6388)
at usePathname (https://www.vasekvety.sk/_next/static/chunks/296-ae496176be3b700e.js:1:2092)
// ... the rest is not relevant ...
Mandatory reproduction URL
Not needed really
Reproduction description
Steps to reproduce:
I don't think this is necessary; both the error and the docs mentioning replaceAll is a new function are descriptive enough
Expected behaviour
I expect that the templateToRegex function is run without any error at replaceAll() line
The text was updated successfully, but these errors were encountered:
So the last user who had problem was using Chrome 60.0.3112 (2017) on Windows 8.1.
Another user has Chrome 81.0.4044. This version is from April 2020 just 4 months before the replaceAll was added.
replaceAll is just too new in my opinion. Generally it started to be supported 2021 onwards and there is a lot of people in Slovakia (where we get most users from) who haven't updated their browser for 3 years (even longer).
Regarding the failing tests. I actually ran pnpm run test locally before pushing but I saw only the last couple of lines saying PASS so I thought all passed. Sorry for that.
Description
Hi!
People using slightly older browsers trigger the following error in my Sentry:
t.replace(...).replaceAll is not a function
that's because
replaceAll
is kinda new function.Would it be possible to change the usage of this in the project? It appears only at two places:
next-intl/packages/next-intl/src/shared/utils.tsx
Line 114 in cb74c29
next-intl/packages/next-intl/src/middleware/utils.tsx
Line 123 in cb74c29
My users are hitting error boundary and cannot use the web at the moment.
Full Error Stack
Mandatory reproduction URL
Not needed really
Reproduction description
Steps to reproduce:
Expected behaviour
I expect that the
templateToRegex
function is run without any error atreplaceAll()
lineThe text was updated successfully, but these errors were encountered: