Skip to content

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

fix(v1): converting bad docs always gives null

Gergő Móricz97ffabff3a6b
diff --git a/apps/api/src/controllers/v1/types.ts b/apps/api/src/controllers/v1/types.ts
index 6b2db3089..c44c1cc5c 100644
--- a/apps/api/src/controllers/v1/types.ts
+++ b/apps/api/src/controllers/v1/types.ts
@@ -348,7 +348,7 @@ export function legacyExtractorOptions(x: ExtractOptions): ExtractorOptions {
}
export function legacyDocumentConverter(doc: any): Document {
- if (doc === null || doc === undefined) return doc;
+ if (doc === null || doc === undefined) return null;
if (doc.metadata) {
if (doc.metadata.screenshot) {