fix on success trigger (#7202)

This commit is contained in:
centdix
2025-11-21 19:41:38 +01:00
committed by GitHub
parent dd106db731
commit d4c427e4f9

View File

@@ -196,7 +196,7 @@
id: string
result_stream?: string
}) {
setResult(nresult_stream, id)
setResult(nresult_stream, id, false)
},
cancel({ id }: { id: string }) {
onCancel?.()
@@ -630,7 +630,7 @@
result = res
}
async function setResult(res: any, jobId: string | undefined) {
async function setResult(res: any, jobId: string | undefined, dispatchSuccess: boolean = true) {
dispatch('resultSet', res)
const errors = getResultErrors(res)
@@ -669,7 +669,9 @@
recordJob(jobId, result, undefined, transformerResult)
delete $errorByComponent[id]
dispatch('success', result)
if (dispatchSuccess) {
dispatch('success', result)
}
// callbacks?.done(res)
}