mirror of
https://github.com/infiniflow/ragflow.git
synced 2025-12-26 08:56:47 +08:00
Dragging down a downstream node of a Switch operator will cause the end_cpn_ids to contain the ID of the placeholder operator. #12177 (#12178)
### What problem does this PR solve? Dragging down a downstream node of a Switch operator will cause the end_cpn_ids to contain the ID of the placeholder operator. #12177 ### Type of change - [x] Bug Fix (non-breaking change which fixes an issue)
This commit is contained in:
@ -466,7 +466,7 @@ const useGraphStore = create<RFState>()(
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
updateSwitchFormData: (source, sourceHandle, target, isConnecting) => {
|
updateSwitchFormData: (source, sourceHandle, target, isConnecting) => {
|
||||||
const { updateNodeForm, edges } = get();
|
const { updateNodeForm, edges, getOperatorTypeFromId } = get();
|
||||||
if (sourceHandle) {
|
if (sourceHandle) {
|
||||||
// A handle will connect to multiple downstream nodes
|
// A handle will connect to multiple downstream nodes
|
||||||
let currentHandleTargets = edges
|
let currentHandleTargets = edges
|
||||||
@ -474,7 +474,8 @@ const useGraphStore = create<RFState>()(
|
|||||||
(x) =>
|
(x) =>
|
||||||
x.source === source &&
|
x.source === source &&
|
||||||
x.sourceHandle === sourceHandle &&
|
x.sourceHandle === sourceHandle &&
|
||||||
typeof x.target === 'string',
|
typeof x.target === 'string' &&
|
||||||
|
getOperatorTypeFromId(x.target) !== Operator.Placeholder,
|
||||||
)
|
)
|
||||||
.map((x) => x.target);
|
.map((x) => x.target);
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user