From 97ffabff3a6b6bd1c7455b85ce794949f540469b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gerg=C5=91=20M=C3=B3ricz?= Date: Tue, 10 Sep 2024 21:21:20 +0200 Subject: [PATCH] fix(v1): converting bad docs always gives null --- apps/api/src/controllers/v1/types.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/apps/api/src/controllers/v1/types.ts b/apps/api/src/controllers/v1/types.ts index 6b2db308..c44c1cc5 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) {