Skip to content

Commit 4cd31ce

Browse files
authored
fix: prevent workflow destructuring errors for failing tasks (#9649)
When destructuring the output of task in a job workflow handler, there is a chance of a destructuring error being thrown if the task fails
1 parent f151723 commit 4cd31ce

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

packages/payload/src/queues/operations/runJobs/runJob/getRunTaskFunction.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -231,7 +231,7 @@ export const getRunTaskFunction = <TIsInline extends boolean>(
231231
return
232232
}
233233

234-
let output: object
234+
let output: object = {}
235235

236236
try {
237237
const runnerOutput = await runner({

0 commit comments

Comments
 (0)