fix(workflow): handle node inspection variable deletion when not fetched

This commit is contained in:
zhsama 2025-11-04 15:25:15 +08:00
parent 7df6d9f1aa
commit b9bb97887b

View File

@ -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,