[Teleport] - Updating component inside Teleport causes HMR to crash #12816
Labels
🔨 p3-minor-bug
Priority 3: this fixes a bug, but is an edge case that only affects very specific usage.
has workaround
A workaround has been found to avoid the problem
scope: hmr
Vue version
3.5.13
Link to minimal reproduction
https://stackblitz.com/edit/vitejs-vite-grzg8vpe?file=src%2FApp.vue
Steps to reproduce
In App.vue update the slot content to anything else.
Also happens if you change the "Modal.vue", as an example change the class "modal__dialogs" to "modal_potatos".
In the browser's console it shows:
TypeError: Cannot set properties of null (setting '__vnode')
It's related to reactivity inside the component Modal.vue, in the computed "modalClasses", remove the reference to the ref "isVisible" and the error will not happen, or if the value of "isVisible" is set as "true" (line 16).
// Not sure if the title is accurate
What is expected?
I expect the modal component's hot reload to work normally.
What is actually happening?
Hot reload stops working after the error, need to refresh the page.
System Info
Any additional comments?
No response
The text was updated successfully, but these errors were encountered: