Skip to content

Commit 6beeaf0

Browse files
committed
fix "undefined" text appearing on canvas after connecting unconnected connection to node
1 parent 7317714 commit 6beeaf0

File tree

1 file changed

+7
-3
lines changed
  • libs/visual-programming-system/src/components

1 file changed

+7
-3
lines changed

libs/visual-programming-system/src/components/rect.ts

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -749,9 +749,13 @@ export class Rect<T extends BaseNodeInfo> {
749749
}
750750
}
751751

752-
(this.canvas?.domElement as unknown as HTMLElement | SVGElement).append(
753-
draggedConnection.startNode?.domElement as unknown as HTMLElement
754-
);
752+
if (draggedConnection.startNode?.domElement) {
753+
(
754+
this.canvas?.domElement as unknown as HTMLElement | SVGElement
755+
).append(
756+
draggedConnection.startNode?.domElement as unknown as HTMLElement
757+
);
758+
}
755759

756760
if (this.canvasUpdated) {
757761
this.canvasUpdated(

0 commit comments

Comments
 (0)