Skip to content

component is accessible by this from function declared in <script setup> on dev mode #6822

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

Open
sapphi-red opened this issue Oct 5, 2022 · 0 comments · May be fixed by #6827
Open

component is accessible by this from function declared in <script setup> on dev mode #6822

sapphi-red opened this issue Oct 5, 2022 · 0 comments · May be fixed by #6827
Labels
🍰 p2-nice-to-have Priority 2: this is not breaking anything but nice to have it addressed. 🐞 bug Something isn't working

Comments

@sapphi-red
Copy link
Contributor

Vue version

3.2.40

Link to minimal reproduction

https://sfc.vuejs.org/#__DEV__eNqNkc9uwjAMxl/FygUQNEHbTqhM7D1yKWkKGc0fJQ7TVPXd57QcgEnTbrH92T/7y8A+QuDXrNmO1UlFExCSxhzepTM2+IgwQNQdjNBFb2FB0oV00invEoLy2SHsi2K5XZV8l51C4x103i9XMEgHpHLJ95r3/rTEs0l8aiP5KF0tZirxKEBtQ9+gpgigbs0VVN+ktJdMNbGVbMpT5ZgRiYHfQVNtjiSDg+qNuhR1AazX1DBvaBIMw23bcazF3PHfadMpNMtnDPl29MOMWtCq9KrF3QFsw2YHK9sE/pm8I48nP+StkCTbzQ6VHDlbYsnOiCHthMguXE7klRUHqolIVGN11Xp7eOUv/G1L1IT3ea6TrY7RfyUdiSjZ5m64oORVxypq1+qo45+wJ+0D8Kn2C1qY9LMjG38AeufSrA==

Steps to reproduce

  1. Open reproduction
  2. Click output count button

Note that @click="foo()" is using foo(). It work well when this is @click="foo".

What is expected?

Cannot read properties of undefined (reading 'count') error happen on dev too. (it happens on prod)

What is actually happening?

0 will be shown in console on dev

System Info

No response

Any additional comments?

original issue: vitejs/vite#3872

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🍰 p2-nice-to-have Priority 2: this is not breaking anything but nice to have it addressed. 🐞 bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants