-
-
Notifications
You must be signed in to change notification settings - Fork 861
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
Crashes when fallbackLocale is not provided #849
Labels
good first issue
Good for newcomers
help wanted
Extra attention is needed
Status: PR Welcome
Welcome to Pull Request
Type: Improvement
Includes backwards-compatible fixes
Comments
I can work around that on my side by using some "random" string value rather than |
kazupon
added
good first issue
Good for newcomers
help wanted
Extra attention is needed
Status: PR Welcome
Welcome to Pull Request
Type: Improvement
Includes backwards-compatible fixes
labels
Apr 20, 2020
rchl
added a commit
to nuxt-modules/i18n
that referenced
this issue
Apr 22, 2020
rchl
added a commit
to nuxt-modules/i18n
that referenced
this issue
Apr 22, 2020
rchl
added a commit
to nuxt-modules/i18n
that referenced
this issue
Apr 22, 2020
Thanks for considering it but I've realized I can use empty string instead of null which will fix my issue and will be in line with the expected type of the locale. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
good first issue
Good for newcomers
help wanted
Extra attention is needed
Status: PR Welcome
Welcome to Pull Request
Type: Improvement
Includes backwards-compatible fixes
This is not a bug but it's a behavior change for
nuxt-i18n
so I'm creating it for your consideration.vue & vue-i18n version
vue-i18n: 8.17.3
Reproduction Link
https://jsfiddle.net/4m5yaq1e/5/
(It doesn't reproduce any issue but shows the sort of configuration that
nuxt-i18n
has a problem with)Steps to reproduce
In
nuxt-i18n
I have one test that started failing with latest version ofvue-i18n
.That test asserts that
vue-i18n
with an empty configuration doesn't cause any issues but it started crashing.An empty configuration would normally not cause issues in
vue-i18n
but, for specific reasons, I'm explicitly alteringi18n.locale
andi18n.fallbackLocale
tonull
at runtime when no values were provided for those.vue-i18n
didn't have problems with that before, until #138 which added code that crashes when locale/fallbackLocale is null.The stack trace is something like this:
What is Expected?
I don't expect this to be treated as a bug as the usage is somewhat non-standard and not in line with documentation, but also it probably would be easy to change the code to not crash in this situation.
The text was updated successfully, but these errors were encountered: