Skip to content

Commit 2686bec

Browse files
DrJKLampcode-com
andcommitted
fix: correct disconnect dispatch args, import typo, and test timeout
- LGraphNode: use link_info.origin_slot instead of array index for sourceSlotIndex in dispatchDisconnectNodePair - SubgraphInputNode: pass node input slot instead of subgraphInput for INPUT disconnect dispatch - SubgraphIO.test: fix double slash in import path - NightlySurveyPopover.test: remove unnecessary 15000ms timeout on fake-timer test Amp-Thread-ID: https://ampcode.com/threads/T-019c9bcb-2c95-712d-8978-ab8e9e688e4d Co-authored-by: Amp <amp@ampcode.com>
1 parent 3331ab9 commit 2686bec

File tree

4 files changed

+8
-6
lines changed

4 files changed

+8
-6
lines changed

src/lib/litegraph/src/LGraphNode.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3235,7 +3235,7 @@ export class LGraphNode
32353235

32363236
graphLifecycleEventDispatcher.dispatchDisconnectNodePair({
32373237
sourceNode: target_node,
3238-
sourceSlotIndex: i,
3238+
sourceSlotIndex: link_info.origin_slot,
32393239
sourceSlot: output,
32403240
targetNode: this,
32413241
targetSlotIndex: slot,

src/lib/litegraph/src/subgraph/SubgraphIO.test.ts

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,10 @@ import {
77
SUBGRAPH_INPUT_ID,
88
SUBGRAPH_OUTPUT_ID
99
} from '@/lib/litegraph/src/constants'
10-
import { LinkDirection } from '@/lib/litegraph/src//types/globalEnums'
11-
import { NodeSlotType } from '@/lib/litegraph/src/types/globalEnums'
10+
import {
11+
LinkDirection,
12+
NodeSlotType
13+
} from '@/lib/litegraph/src/types/globalEnums'
1214
import { createUuidv4 } from '@/lib/litegraph/src/utils/uuid'
1315

1416
import { subgraphTest } from './__fixtures__/subgraphFixtures'
@@ -169,7 +171,7 @@ describe('SubgraphIO - Input Slot Dual-Nature Behavior', () => {
169171
0,
170172
false,
171173
link,
172-
subgraphInput
174+
internalNode.inputs[0]
173175
)
174176
expect(internalNode.inputs[0].link).toBeNull()
175177
expect(subgraphInput.linkIds).toEqual([])

src/lib/litegraph/src/subgraph/SubgraphInputNode.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -209,7 +209,7 @@ export class SubgraphInputNode
209209
slotIndex,
210210
connected: false,
211211
link,
212-
slot: subgraphInput
212+
slot: input
213213
})
214214
}
215215

src/platform/surveys/NightlySurveyPopover.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,7 @@ describe('NightlySurveyPopover', () => {
9090
await nextTick()
9191

9292
expect(wrapper.find(POPOVER_SELECTOR).exists()).toBe(true)
93-
}, 15000)
93+
})
9494

9595
it('does not show when not eligible', async () => {
9696
setFeatureUsage('test-feature', 1)

0 commit comments

Comments
 (0)