File tree Expand file tree Collapse file tree 2 files changed +3
-10
lines changed
Expand file tree Collapse file tree 2 files changed +3
-10
lines changed Original file line number Diff line number Diff line change 1+ import { pull } from 'lodash'
2+
13import type { LGraphNode } from '@/lib/litegraph/src/LGraphNode'
24import { LLink } from '@/lib/litegraph/src/LLink'
35import type { RerouteId } from '@/lib/litegraph/src/Reroute'
@@ -9,7 +11,6 @@ import type {
911} from '@/lib/litegraph/src/interfaces'
1012import { LiteGraph } from '@/lib/litegraph/src/litegraph'
1113import { NodeSlotType } from '@/lib/litegraph/src/types/globalEnums'
12- import { removeFromArray } from '@/lib/litegraph/src/utils/collections'
1314
1415import type { SubgraphInput } from './SubgraphInput'
1516import type { SubgraphOutputNode } from './SubgraphOutputNode'
@@ -59,7 +60,7 @@ export class SubgraphOutput extends SubgraphSlot {
5960 existingLink . disconnect ( subgraph , 'input' )
6061 const resolved = existingLink . resolve ( subgraph )
6162 const links = resolved . output ?. links
62- if ( links ) removeFromArray ( links , existingLink . id )
63+ if ( links ) pull ( links , existingLink . id )
6364 }
6465
6566 const link = new LLink (
Original file line number Diff line number Diff line change @@ -112,11 +112,3 @@ export function findFreeSlotOfType<T extends { type: ISlotType }>(
112112 }
113113 return wildSlot ?? occupiedSlot ?? occupiedWildSlot
114114}
115-
116- export function removeFromArray < T > ( array : T [ ] , value : T ) : boolean {
117- const index = array . indexOf ( value )
118- const found = index !== - 1
119-
120- if ( found ) array . splice ( index , 1 )
121- return found
122- }
You can’t perform that action at this time.
0 commit comments