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
1 changed files with 6 additions and 0 deletions

View File

@ -1040,12 +1040,18 @@ const useOneStepRun = <T>({
const {
workflowRunningData,
setWorkflowRunningData,
nodesWithInspectVars,
deleteNodeInspectVars,
} = workflowStore.getState()
if (workflowRunningData) {
setWorkflowRunningData(produce(workflowRunningData, (draft) => {
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,
runningStatus,