Skip to content

toLocaleString() inconsistent behavior is causing error #418 - hydration mismatch #79397

Discussion options

You must be logged in to vote

I've experienced this with South African currency, nodejs/node#48120

Could this indicate that the environment running your revalidation, has a runtime with an issue, or not updated version?

Like, locally, I run node 22 with this:

Welcome to Node.js v22.14.0.
Type ".help" for more information.
> const number = 1000
undefined
> 
> // request a currency format
undefined
> console.log(
...   number.toLocaleString("it-IT", { style: "currency", currency: "EUR" }),
... );
1000,00 €

However, Node 20.11.1:

Welcome to Node.js v20.11.1.
Type ".help" for more information.
> const number = 1000
undefined
> 
> // request a currency format
undefined
> console.log(
...   number.toLocaleString("it-IT", { …

Replies: 2 comments

Comment options

You must be logged in to vote
0 replies
Answer selected by markoleavy
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
2 participants