HMR on `keepalive` components caused error
Version
3.2.24
Reproduction link
Steps to reproduce
- click
go to bar
and then clickgo to foo
, to make the componentBar
deactivated. - click
go to bar
, modify the code line 18 inBar.vue
:const message = ref("test")
->const message = ref("any other words")
.
What is expected?
New message was shown.
What is actually happening?
TypeError: parentComponent.ctx.deactivate is not a function.
I have seen the similar issues and they do not resolve this problem. This issue was mentioned in the latest comment in #4387 . The parentComponent
of Bar
is itself instead of keep-alive
When HMR occurs.
#5165, it can fix it, I add a test case to reappearance the situation this problem is related to cache of keep-alive