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

beforeUnmount is called twice #2169

Closed
07akioni opened this issue Sep 19, 2020 · 2 comments
Closed

beforeUnmount is called twice #2169

07akioni opened this issue Sep 19, 2020 · 2 comments
Labels
🐞 bug Something isn't working

Comments

@07akioni
Copy link
Contributor

07akioni commented Sep 19, 2020

Version

3.0.0

Reproduction link

Reproduction 1
https://codesandbox.io/s/vue-unmount-bug-hdi3o?file=/src/index.js

Reproduction 2 (using template, has bug)
https://codesandbox.io/s/vue-unmount-bug-2-vr290?file=/src/index.js
Reproduction 2 (using h, behaves correctly, it could be a bug of vue compiler)
https://codesandbox.io/s/vue-unmount-bug-render-1bhk1?file=/src/index.js

Reproduction 2.1 (a more compact reproduction of R2)
https://codesandbox.io/s/vue-unmount-bug-21-8jo3l

R1 and R2 may be caused by different reasons, please have a look.

Steps to reproduce

follow the link.

What is expected?

beforeUnmount is called once.

What is actually happening?

beforeUnmount is called twice.


It seems different child of a parent instance resolve to the same child instance. The reproduction condition is quite wired.

update: maybe it's related to createBlock.

@07akioni
Copy link
Contributor Author

07akioni commented Sep 20, 2020

Reproduction 2 is not fixed by #2173.

@HcySunYang
Copy link
Member

Yes, they caused by different reasons, I have fixed it in the latest commit.

@github-actions github-actions bot locked and limited conversation to collaborators Nov 4, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
🐞 bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants