-
-
Notifications
You must be signed in to change notification settings - Fork 33.8k
Closed
Description
Version
2.5.17
Reproduction link
https://codesandbox.io/s/m674vkw2j
Steps to reproduce
Use the optional chaining operator in a template:
{{ user?.id }}
What is expected?
Output the users id in the template or blank for undefined
What is actually happening?
- invalid expression: Unexpected token . in "\n " _s(user?.id) "\n " Raw expression: {{ user?.id }}
Optional chaining works just fine in the script section of a SFC Vue component but does not work in the template section.
For reference, this is in an Nuxt.js 2.0 project stock settings with the babel optional chaining plugin
Version is actually 15.4.2 with Vue 2.5.17
isvladxxe, jurrian, a-x-, BenRichter, cypressious and 6 more
Metadata
Metadata
Assignees
Labels
No labels