-
-
Notifications
You must be signed in to change notification settings - Fork 641
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
addResourceBundle mutates its argument "resources" #2081
Comments
should be addressed with v23.8.3 |
This was referenced May 26, 2024
heharm
pushed a commit
to wanderlog/i18next
that referenced
this issue
Aug 15, 2024
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
🐛 Bug Report
Hi, First sorry if it is not a bug, but perhaps it deserves a word in the documentation if not.
It's about reusing the same base translation for different namespaces, and doing it using the same object for base.
As the sample code shows, the function addResouceBundle mutates its third parameters, leading to confusion
To Reproduce
https://codesandbox.io/p/sandbox/test-z3hr2l
Expected behavior
Naively expecting : "v for ns1", but get "v for ns2" instead.
Maybe a deepcopy done by the library itself, so that it prints
v for ns1
or a few word accompagnying the document foraddResourceBundle
Your Environment
The text was updated successfully, but these errors were encountered: