You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Since optional chaining and nullish coalescing not being supported in vue 2 templates I wonder what to do with possibly undefined values like this {{ tags.get(question.tagId).name }} which gives me the error Object is possibly 'undefined'. Is there a possibility to solve this in the template or do have to use a getter in the script part of the component?
The text was updated successfully, but these errors were encountered:
tom-richter
changed the title
How to solve Object is possibly 'undefined' errors without optinal chaining
How to solve Object is possibly 'undefined' errors without optional chaining
Apr 13, 2021
Since optional chaining and nullish coalescing not being supported in vue 2 templates I wonder what to do with possibly undefined values like this
{{ tags.get(question.tagId).name }}
which gives me the errorObject is possibly 'undefined'
. Is there a possibility to solve this in the template or do have to use a getter in the script part of the component?The text was updated successfully, but these errors were encountered: