Skip to content

Commit 39885a4

Browse files
committed
v3: fix missing init output in task run function when no middleware is defined
1 parent ccb0bc5 commit 39885a4

File tree

2 files changed

+6
-1
lines changed

2 files changed

+6
-1
lines changed

.changeset/twelve-knives-notice.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"@trigger.dev/core": patch
3+
---
4+
5+
v3: fix missing init output in task run function when no middleware is defined

packages/core/src/v3/workers/taskExecutor.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -229,7 +229,7 @@ export class TaskExecutor {
229229
}
230230

231231
if (!middlewareFn) {
232-
return runFn(payload, { ctx });
232+
return runFn(payload, { ctx, init });
233233
}
234234

235235
return middlewareFn(payload, { ctx, next: async () => runFn(payload, { ctx, init }) });

0 commit comments

Comments
 (0)