fix: prevent circular reference errors on task indexing when using schemaTask (#2383)

* fix: prevent circular reference errors on task indexing when using schemaTask

* add changeset
This commit is contained in:
Eric Allam
2025-08-13 14:10:57 +01:00
committed by GitHub
parent cd6a0b3a3e
commit ed07bf9306
2 changed files with 8 additions and 3 deletions
+5
View File
@@ -0,0 +1,5 @@
---
"trigger.dev": patch
---
fix: prevent circular reference errors on task indexing when using schemaTask
@@ -61,7 +61,7 @@ export class StandardResourceCatalog implements ResourceCatalog {
return;
}
const { fns, ...metadata } = task;
const { fns, schema, ...metadata } = task;
if (!task.id) {
return;
@@ -74,8 +74,8 @@ export class StandardResourceCatalog implements ResourceCatalog {
this._taskMetadata.set(task.id, metadata);
this._taskFunctions.set(task.id, fns);
if (task.schema) {
this._taskSchemas.set(task.id, task.schema);
if (schema) {
this._taskSchemas.set(task.id, schema);
}
}