fix(v1): converting bad docs always gives null

This commit is contained in:
Gergő Móricz 2024-09-10 21:21:20 +02:00
parent 83a165db0f
commit 97ffabff3a

View File

@ -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) {