Skip to content

Commit b2ca48f

Browse files
committed
fix: convert null to undefined for agentTemplate type compatibility
1 parent 6e80495 commit b2ca48f

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

packages/agent-runtime/src/run-agent-step.ts

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -553,10 +553,11 @@ export async function loopAgentSteps(
553553

554554
let agentTemplate = params.agentTemplate
555555
if (!agentTemplate) {
556-
agentTemplate = await getAgentTemplate({
557-
...params,
558-
agentId: agentType,
559-
})
556+
agentTemplate =
557+
(await getAgentTemplate({
558+
...params,
559+
agentId: agentType,
560+
})) ?? undefined
560561
}
561562
if (!agentTemplate) {
562563
throw new Error(`Agent template not found for type: ${agentType}`)

0 commit comments

Comments
 (0)