Fix crash connecting to node with no slots (#644)

* Fix crash connecting to node with no slots

* Add playwright test

* Update test expectations [skip ci]

---------

Co-authored-by: huchenlei <chenlei.hu@mail.utoronto.ca>
Co-authored-by: github-actions <github-actions@github.com>
This commit is contained in:
pythongosssss
2024-08-26 23:29:52 +01:00
committed by GitHub
parent 96d129e8a6
commit c604209f40
3 changed files with 14 additions and 0 deletions

View File

@@ -54,6 +54,8 @@ export class ConnectingLinkImpl implements ConnectingLink {
connectTo(newNode: LGraphNode) {
const newNodeSlots =
this.releaseSlotType === 'output' ? newNode.outputs : newNode.inputs
if (!newNodeSlots) return
const newNodeSlot = newNodeSlots.findIndex(
(slot: INodeSlot) =>
slot.type === this.type || slot.type === '*' || this.type === '*'