Skip to content

Commit 3815296

Browse files
authored
Add Disconnect Links option to input slot menu (#901)
1 parent 0032675 commit 3815296

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/LGraphCanvas.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7102,8 +7102,9 @@ export class LGraphCanvas implements ConnectionColorContext {
71027102
if (node.getSlotMenuOptions) {
71037103
menu_info = node.getSlotMenuOptions(slot)
71047104
} else {
7105-
if (slot?.output?.links?.length)
7105+
if (slot.output?.links?.length || slot.input?.link != null) {
71067106
menu_info.push({ content: "Disconnect Links", slot })
7107+
}
71077108

71087109
const _slot = slot.input || slot.output
71097110
if (!_slot) throw new TypeError("Both in put and output slots were null when processing context menu.")

0 commit comments

Comments
 (0)