Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: Improve support for older browsers by switching from replaceAll to replace #885

Merged
merged 3 commits into from
Mar 15, 2024

Conversation

MichalMoravik
Copy link
Contributor

@MichalMoravik MichalMoravik commented Feb 25, 2024

Fixes #884

Copy link

vercel bot commented Feb 25, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
next-intl-docs ✅ Ready (Inspect) Visit Preview 💬 Add feedback Mar 15, 2024 9:18am
next-intl-example-app-router ✅ Ready (Inspect) Visit Preview 💬 Add feedback Mar 15, 2024 9:18am

Copy link

vercel bot commented Feb 25, 2024

@MichalMoravik is attempting to deploy a commit to the next-intl Team on Vercel.

A member of the Team first needs to authorize it.

Copy link
Owner

@amannn amannn left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for proposing this change! I'd generally be ok with this, as long as bundle size doesn't grow.

Seems like the regex is invalid currently: https://github.com/amannn/next-intl/actions/runs/8041481638/job/21968736617?pr=885

Can you share which browser you saw in your bug report?

@MichalMoravik
Copy link
Contributor Author

@amannn I replied in the issue. Thank you!!

@amannn
Copy link
Owner

amannn commented Feb 28, 2024

Thanks! Yep, as mentioned I'd be ok with this change as long as the bundle size doesn't grow. Can you fix the invalid regex?

@MichalMoravik
Copy link
Contributor Author

MichalMoravik commented Mar 13, 2024

Hey @amannn, sorry for getting back so late. I just changed .replaceAll to .replace again after new updates. Can you check if everything is correct and let me know if this would be possible? Thanks!

Copy link
Owner

@amannn amannn left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Perfect, thanks a lot @MichalMoravik!

@amannn amannn changed the title fix: replaceAll changed to replace to support older browser versions fix: Improve support for older browsers by replacing the usage of replaceAll with replace Mar 15, 2024
@amannn amannn changed the title fix: Improve support for older browsers by replacing the usage of replaceAll with replace fix: Improve support for older browsers by switching from replaceAll to replace Mar 15, 2024
@amannn amannn merged commit 080333a into amannn:main Mar 15, 2024
7 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

t.replace(...).replaceAll is not a function
2 participants