fix(v1): don't fail on doc = null
This commit is contained in:
@@ -292,6 +292,8 @@ export function legacyScrapeOptions(x: ScrapeOptions): PageOptions {
|
|||||||
}
|
}
|
||||||
|
|
||||||
export function legacyDocumentConverter(doc: any): Document {
|
export function legacyDocumentConverter(doc: any): Document {
|
||||||
|
if (doc === null || doc === undefined) return doc;
|
||||||
|
|
||||||
if (doc.metadata) {
|
if (doc.metadata) {
|
||||||
if (doc.metadata.screenshot) {
|
if (doc.metadata.screenshot) {
|
||||||
doc.screenshot = doc.metadata.screenshot;
|
doc.screenshot = doc.metadata.screenshot;
|
||||||
|
|||||||
Reference in New Issue
Block a user