Usage of n()
and $n()
with undefined
should not throw errors
#1746
Labels
Status: Proposal
Request for comments
n()
and $n()
with undefined
should not throw errors
#1746
Clear and concise description of the problem
Sometimes values are undefined within an application, unfortunately this will throw a 500 error (at least in Nuxt) so the whole page is unavailable just because one variable is undefined:
Another example are inputs:
These can get undefined while the user is editing the input value which will also throw errors:
Suggested solution
It would be great if the function
n()
and$n()
would instead just return an empty string''
without the whole page crashing or throwing any errors.Alternative
No response
Additional context
No response
Validations
The text was updated successfully, but these errors were encountered: