Skip to content

Supercharge your AI agents with data from the web and beyond. Building the library for superintelligence. 🔥

fix(v2): change tracking without options

Gergő Móricz28e6a35026c3
diff --git a/apps/api/src/controllers/v2/types.ts b/apps/api/src/controllers/v2/types.ts
index 961a8cba2..61289d145 100644
--- a/apps/api/src/controllers/v2/types.ts
+++ b/apps/api/src/controllers/v2/types.ts
@@ -1103,13 +1103,13 @@ export function fromV1ScrapeOptions(
} else if (x === "json") {
return null;
} else if (x === "changeTracking") {
- const opts = v1ScrapeOptions.changeTrackingOptions!;
+ const opts = v1ScrapeOptions.changeTrackingOptions;
const fmt: ChangeTrackingFormatWithOptions = {
type: "changeTracking",
- modes: opts.modes,
- tag: opts.tag,
- schema: opts.schema,
- prompt: opts.prompt,
+ modes: opts?.modes ?? [],
+ tag: opts?.tag ?? null,
+ schema: opts?.schema,
+ prompt: opts?.prompt,
};
return fmt;
} else {