Skip to content

Commit fd790c9

Browse files
ZsynutingCopilot
andauthored
Potential fix for pull request finding
Co-authored-by: Copilot Autofix powered by AI <[email protected]>
1 parent 40960c9 commit fd790c9

1 file changed

Lines changed: 6 additions & 5 deletions

File tree

  • packages/vue-node-registry/src

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

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -90,16 +90,17 @@ export class VueNodeView extends HtmlNode {
9090
const nodeConfig = getVueNodeConfig(model.type, graphModel)
9191
if (!nodeConfig) {
9292
// No registered config for this node type; ensure any existing Teleport mount is cleaned up
93-
if (isVue3 && isActive()) {
94-
disconnect(this.targetId(), this.props.graphModel.flowId as string)
93+
const flowId = this.props.graphModel.flowId
94+
if (isVue3 && isActive() && flowId) {
95+
disconnect(this.targetId(), flowId)
9596
}
9697
return
9798
}
98-
const { component } = nodeConfig
9999
if (!component) {
100100
// Config exists but has no component; also clean up any existing Teleport mount
101-
if (isVue3 && isActive()) {
102-
disconnect(this.targetId(), this.props.graphModel.flowId as string)
101+
const flowId = this.props.graphModel.flowId
102+
if (isVue3 && isActive() && flowId) {
103+
disconnect(this.targetId(), flowId)
103104
}
104105
return
105106
}

0 commit comments

Comments
 (0)