Skip to content
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

Computed in child component gets executed even when v-if is false in parent component, but only when computed prop is watched #3143

Closed
rashfael opened this issue Feb 1, 2021 · 2 comments

Comments

@rashfael
Copy link

rashfael commented Feb 1, 2021

Version

3.0.5

Reproduction link

https://codesandbox.io/s/wild-flower-2nucq

Steps to reproduce

  1. Click button toggle

What is expected?

  • the text I should disappear should disappear

What is actually happening?

  • exception is thrown inside of computed myComputed

This only happens when the watcher on myComputed on components/Foo.vue:L17 exists.

@posva
Copy link
Member

posva commented Feb 1, 2021

Duplicate of #2291

@posva posva marked this as a duplicate of #2291 Feb 1, 2021
@posva posva closed this as completed Feb 1, 2021
@rashfael
Copy link
Author

rashfael commented Feb 2, 2021

Thanks, the workaround in #2291 is working.

rashfael added a commit to rashfael/buntpapier that referenced this issue Feb 5, 2021
@github-actions github-actions bot locked and limited conversation to collaborators Oct 27, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants