Skip to content

Commit 25cff7e

Browse files
committed
Add workaround for incorrect downstream patch
- See Comfy-Org/ComfyUI_frontend#4481
1 parent e10a9c1 commit 25cff7e

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

src/node/NodeSlot.ts

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import type { CanvasColour, DefaultConnectionColors, INodeInputSlot, INodeOutputSlot, INodeSlot, OptionalProps, Point, ReadOnlyPoint } from "@/interfaces"
1+
import type { CanvasColour, DefaultConnectionColors, INodeInputSlot, INodeOutputSlot, INodeSlot, ISubgraphInput, OptionalProps, Point, ReadOnlyPoint } from "@/interfaces"
22
import type { LGraphNode } from "@/LGraphNode"
33

44
import { LabelPosition, SlotShape, SlotType } from "@/draw"
@@ -52,7 +52,10 @@ export abstract class NodeSlot extends SlotBase implements INodeSlot {
5252
abstract get isWidgetInputSlot(): boolean
5353

5454
constructor(slot: OptionalProps<INodeSlot, "boundingRect">, node: LGraphNode) {
55-
const { boundingRect, name, type, ...rest } = slot
55+
// Workaround: Ensure internal properties are not copied to the slot (_listenerController
56+
// https://github.com/Comfy-Org/litegraph.js/issues/1138
57+
const maybeSubgraphSlot: OptionalProps<ISubgraphInput, "link" | "boundingRect"> = slot
58+
const { boundingRect, name, type, _listenerController, ...rest } = maybeSubgraphSlot
5659
const rectangle = boundingRect ? Rectangle.ensureRect(boundingRect) : new Rectangle()
5760

5861
super(name, type, rectangle)

0 commit comments

Comments
 (0)