-
-
Notifications
You must be signed in to change notification settings - Fork 642
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
RangeError: Maximum call stack size exceeded at deepExtend #2160
Comments
Please provide a reproducible example (codesandbox or repository)... not just code snippets |
Figured the issue. It was happening because the json data was having nested default key. Fixed the way were importing the data and its not happening anymore. Closing the ticket. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hello,
We recently upgraded our project to react v18 and typescript v5. Also did upgrade i18next as well. And now getting this error at deepExtend.
Below are the versions we currently have.
"i18next": "^23.8.2"
"i18next-browser-languagedetector": "^7.2.0"
"react-i18next": "^14.0.5"
Here is the code:
const handleCurrentLanguage = async (currentLanguage: string) => {
sessionStorage.setItem("language", currentLanguage);
setCurrentLanguage(currentLanguage);
const translationKey = getLanguageByKey(currentLanguage).translationKey;
const fileName = getLanguageByKey(currentLanguage).fileName;
const res = await loadJson(fileName);
if (res) {
i18n.addResourceBundle(translationKey, "translation", res, true, true);
i18n.changeLanguage(translationKey, () => {
moment.locale(translationKey);
});
}
};
I tracked it happens at i18n.addResourceBundle. Is there any way we could fix it? Thanks in advance!
The text was updated successfully, but these errors were encountered: