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

Doesn't work in Safari 12 because of formatToParts #78

Open
kevinrenskers opened this issue Dec 3, 2024 · 1 comment
Open

Doesn't work in Safari 12 because of formatToParts #78

kevinrenskers opened this issue Dec 3, 2024 · 1 comment

Comments

@kevinrenskers
Copy link

NumberFlow version

@number-flow/[email protected]

Framework version

[email protected]

Describe the bug and the steps to reproduce it

Screenshot 2024-12-03 at 16 13 11

Intl.NumberFormat.formatToParts got added in Safari 13, meaning that this library doesn't work in Safari 12, see https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl/NumberFormat/formatToParts.

Maybe the library could be made to work in Safari 12, not sure? But it would also be good to note the minimum requirement for this library, the docs / README.

Minimal reproduction (greatly appreciated)

No response

@kevinrenskers
Copy link
Author

I included this polyfill into my site: https://github.com/shoptico/NumberFormat.formatToParts/blob/main/NumberFormat.formatToParts.polyfill.js. And now everything works as expected in Safari 12.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants