From 3815296ab53a65c6180141e9a1c7526edfef6c4a Mon Sep 17 00:00:00 2001 From: filtered <176114999+webfiltered@users.noreply.github.com> Date: Mon, 7 Apr 2025 01:22:19 +1000 Subject: [PATCH] Add Disconnect Links option to input slot menu (#901) --- src/LGraphCanvas.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/LGraphCanvas.ts b/src/LGraphCanvas.ts index 3228e3aec..e83a6f828 100644 --- a/src/LGraphCanvas.ts +++ b/src/LGraphCanvas.ts @@ -7102,8 +7102,9 @@ export class LGraphCanvas implements ConnectionColorContext { if (node.getSlotMenuOptions) { menu_info = node.getSlotMenuOptions(slot) } else { - if (slot?.output?.links?.length) + if (slot.output?.links?.length || slot.input?.link != null) { menu_info.push({ content: "Disconnect Links", slot }) + } const _slot = slot.input || slot.output if (!_slot) throw new TypeError("Both in put and output slots were null when processing context menu.")