From 32062aa126ac3d711f9f18fd296212a15c53d501 Mon Sep 17 00:00:00 2001 From: filtered <176114999+webfiltered@users.noreply.github.com> Date: Sun, 20 Jul 2025 22:23:07 +1000 Subject: [PATCH] Add workaround for incorrect downstream patch (#1139) --- src/node/NodeSlot.ts | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/node/NodeSlot.ts b/src/node/NodeSlot.ts index 4115bef102..849bd56763 100644 --- a/src/node/NodeSlot.ts +++ b/src/node/NodeSlot.ts @@ -1,4 +1,4 @@ -import type { CanvasColour, DefaultConnectionColors, INodeInputSlot, INodeOutputSlot, INodeSlot, OptionalProps, Point, ReadOnlyPoint } from "@/interfaces" +import type { CanvasColour, DefaultConnectionColors, INodeInputSlot, INodeOutputSlot, INodeSlot, ISubgraphInput, OptionalProps, Point, ReadOnlyPoint } from "@/interfaces" import type { LGraphNode } from "@/LGraphNode" import { LabelPosition, SlotShape, SlotType } from "@/draw" @@ -52,7 +52,10 @@ export abstract class NodeSlot extends SlotBase implements INodeSlot { abstract get isWidgetInputSlot(): boolean constructor(slot: OptionalProps, node: LGraphNode) { - const { boundingRect, name, type, ...rest } = slot + // Workaround: Ensure internal properties are not copied to the slot (_listenerController + // https://github.com/Comfy-Org/litegraph.js/issues/1138 + const maybeSubgraphSlot: OptionalProps = slot + const { boundingRect, name, type, _listenerController, ...rest } = maybeSubgraphSlot const rectangle = boundingRect ? Rectangle.ensureRect(boundingRect) : new Rectangle() super(name, type, rectangle)