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
pass mongoose object to i18next translate fn #388
Comments
why you pass a mongoose object to translation function? |
it was by mistake. i never had issues with other libraries passing in a mongoose object. |
PR optimizing your situation would be welcome. |
i was not able to debug your code, sorry. |
the options object passed to t function is used to apply replacements on keys. so complexe structures might break that: https://github.com/i18next/i18next/blob/master/src/i18next.translate.js#L1 |
i started with a PR, but your tests are red on master
|
http://i18next.com/pages/test.html runs for me on safari and chrome grunt test runs ok with phantom.js |
closing this due upcoming v2: http://i18next.github.io/i18next.com/ PRs welcome |
hey,
when i pass a mongoose object to the i18next translate fn, my whole node.js crashes.
i took me 30minutes to find out that i18next is responsible for this error, because there is no stack information about it.
so when i convert the mongoose object to a javascript object (.toObject) it works.
maybe you can give me input.
thanks
kirrg
The text was updated successfully, but these errors were encountered: