-
-
Notifications
You must be signed in to change notification settings - Fork 337
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
If $t params are undefined #1155
Comments
kazupon
added
Type: Bug
Bug or Bug fixes
Status: PR Welcome
Welcome to Pull Request
and removed
Status: Review Needed
Request for review comments
labels
Sep 5, 2022
kazupon
added
good first issue
Good for newcomers
🔨 p3-minor-bug
Priority 3: a bug in an edge case that only affects very specific usage
labels
Nov 15, 2022
— with
Volta.net
kazupon
removed
Type: Bug
Bug or Bug fixes
good first issue
Good for newcomers
Status: PR Welcome
Welcome to Pull Request
🔨 p3-minor-bug
Priority 3: a bug in an edge case that only affects very specific usage
labels
Apr 28, 2024
This is not a bug, but expected behavior.
Thanks! |
3 tasks
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Reporting a bug?
When using a variable as a param to the $t() function it works good until the variable is undefined. Then there is an error:
Uncaught (in promise) SyntaxError: Invalid argument
Expected behavior
In previous versions this was handled by the function.
Reproduction
I made a JSFiddle here https://jsfiddle.net/rxn13fa7/4/
Its the "undefined" on row 28 that creates the error. Remove it and it works fine.
System Info
Screenshot
No response
Additional context
The current solution I do is making a wrapping function like this
translate (key) { return key ? this.$t(key) : '' }
Validations
The text was updated successfully, but these errors were encountered: