-
-
Notifications
You must be signed in to change notification settings - Fork 8.9k
Description
Vue version
3.5.18
Link to minimal reproduction
https://stackblitz.com/edit/vitejs-vite-ifzgrlqm?file=src%2FTTeleport.vue&terminal=dev
Steps to reproduce
- Open the browser console.
- Delete/restore
v-if="isVue3"
and wait for hot update.
What is expected?
Correctly handle mounting nodes inside components
What is actually happening?
The target element cannot be found when processing the mount node.
TypeError: Cannot read properties of null (reading 'nextSibling')
at nextSibling (vue.js?v=f5f5a4e4:10626:31)
at removeFragment (vue.js?v=f5f5a4e4:8075:14)
at remove2 (vue.js?v=f5f5a4e4:8046:9)
at unmount (vue.js?v=f5f5a4e4:8024:9)
at Object.remove (vue.js?v=f5f5a4e4:3087:9)
at unmount (vue.js?v=f5f5a4e4:7999:20)
at patch (vue.js?v=f5f5a4e4:6789:7)
at ReactiveEffect.componentUpdateFn [as fn] (vue.js?v=f5f5a4e4:7550:9)
at ReactiveEffect.run (vue.js?v=f5f5a4e4:495:19)
at vue.js?v=f5f5a4e4:2586:14
System Info
Although this seems to have nothing to do with the system environment, I will still attach my device information.
System:
OS: macOS 15.5
CPU: (8) arm64 Apple M1
Memory: 1.20 GB / 16.00 GB
Shell: 5.9 - /bin/zsh
Binaries:
Node: 22.1.0 - /usr/local/bin/node
npm: 9.6.3 - /opt/homebrew/bin/npm
pnpm: 10.13.1 - /opt/homebrew/bin/pnpm
bun: 1.1.2 - ~/.bun/bin/bun
Browsers:
Brave Browser: 139.1.81.131
Chrome: 139.0.7258.67
Safari: 18.5
Any additional comments?

I am currently implementing a component library compatible with both vue2 and vue3, but since there is no built-in teleport component in vue2, this judgment processing is necessary in the template.