-
-
Notifications
You must be signed in to change notification settings - Fork 8.8k
Closed
Labels
has PRA pull request has already been submitted to solve the issueA pull request has already been submitted to solve the issue🔩 p2-edge-case
Description
Vue version
3.3.4
Link to minimal reproduction
Steps to reproduce
Steps to reproduce the bug from scratch (repro already has this covered):
- Import an object/enum from another file.
- Try to use their keys as a source of dynamic attribute name or slot name in <script setup> component. Note that this enum/object is not supposed to be used anywhere else in the component except the mentioned place.
- Observe an error since our object/enum is not exposed to the template (you can also check the generated code and take a look at the final
__returned__
variable).
What is expected?
This object/enum should be properly exposed to the template in the final __returned__
variable since it's already being used in the template.
What is actually happening?
An error like Cannot read properties of undefined (reading 'someProperty')
because the variable we're trying to get access to is not exposed.
System Info
System:
OS: macOS 12.4
CPU: (10) arm64 Apple M1 Pro
Memory: 87.78 MB / 16.00 GB
Shell: 5.8.1 - /bin/zsh
Binaries:
Node: 18.12.1 - ~/.nvm/versions/node/v18.12.1/bin/node
npm: 8.19.2 - ~/.nvm/versions/node/v18.12.1/bin/npm
Browsers:
Chrome: 114.0.5735.106
Firefox: 113.0.2
Safari: 15.5
npmPackages:
vue: ^3.3.4 => 3.3.4
Any additional comments?
This is a regression from v3.2.0-beta.4.
Metadata
Metadata
Assignees
Labels
has PRA pull request has already been submitted to solve the issueA pull request has already been submitted to solve the issue🔩 p2-edge-case