Skip to content

Commit 7c7ebb0

Browse files
EralChenCopilot
authored andcommitted
Update packages/vue-node-registry/src/view.ts
Co-authored-by: Copilot <[email protected]>
1 parent fc459da commit 7c7ebb0

1 file changed

Lines changed: 14 additions & 1 deletion

File tree

  • packages/vue-node-registry/src

packages/vue-node-registry/src/view.ts

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -88,8 +88,21 @@ export class VueNodeView extends HtmlNode {
8888

8989
if (root) {
9090
const nodeConfig = getVueNodeConfig(model.type, graphModel)
91-
if (!nodeConfig) return
91+
if (!nodeConfig) {
92+
// No registered config for this node type; ensure any existing Teleport mount is cleaned up
93+
if (isVue3 && isActive()) {
94+
disconnect(this.targetId())
95+
}
96+
return
97+
}
9298
const { component } = nodeConfig
99+
if (!component) {
100+
// Config exists but has no component; also clean up any existing Teleport mount
101+
if (isVue3 && isActive()) {
102+
disconnect(this.targetId())
103+
}
104+
return
105+
}
93106
if (component) {
94107
if (isVue2) {
95108
const Vue = Vue2 as any

0 commit comments

Comments
 (0)