mirror of
https://github.com/langgenius/dify.git
synced 2026-04-28 20:17:29 +08:00
fix(workflow): handle node inspection variable deletion when not fetched
This commit is contained in:
parent
7df6d9f1aa
commit
b9bb97887b
@ -1040,12 +1040,18 @@ const useOneStepRun = <T>({
|
|||||||
const {
|
const {
|
||||||
workflowRunningData,
|
workflowRunningData,
|
||||||
setWorkflowRunningData,
|
setWorkflowRunningData,
|
||||||
|
nodesWithInspectVars,
|
||||||
|
deleteNodeInspectVars,
|
||||||
} = workflowStore.getState()
|
} = workflowStore.getState()
|
||||||
if (workflowRunningData) {
|
if (workflowRunningData) {
|
||||||
setWorkflowRunningData(produce(workflowRunningData, (draft) => {
|
setWorkflowRunningData(produce(workflowRunningData, (draft) => {
|
||||||
draft.result.status = WorkflowRunningStatus.Stopped
|
draft.result.status = WorkflowRunningStatus.Stopped
|
||||||
}))
|
}))
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const inspectNode = nodesWithInspectVars.find(node => node.nodeId === id)
|
||||||
|
if (inspectNode && !inspectNode.isValueFetched && (!inspectNode.vars || inspectNode.vars.length === 0))
|
||||||
|
deleteNodeInspectVars(id)
|
||||||
}, [
|
}, [
|
||||||
isTriggerNode,
|
isTriggerNode,
|
||||||
runningStatus,
|
runningStatus,
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user