mirror of
https://github.com/mendableai/firecrawl.git
synced 2024-11-16 11:42:24 +08:00
fix(v1): don't fail on doc = null
This commit is contained in:
parent
71dab56e36
commit
6a6b487474
|
@ -292,6 +292,8 @@ export function legacyScrapeOptions(x: ScrapeOptions): PageOptions {
|
|||
}
|
||||
|
||||
export function legacyDocumentConverter(doc: any): Document {
|
||||
if (doc === null || doc === undefined) return doc;
|
||||
|
||||
if (doc.metadata) {
|
||||
if (doc.metadata.screenshot) {
|
||||
doc.screenshot = doc.metadata.screenshot;
|
||||
|
|
Loading…
Reference in New Issue
Block a user