mirror of
https://git.mirrors.martin98.com/https://github.com/mendableai/firecrawl
synced 2025-08-05 20:56:07 +08:00
fix(queue-worker): fix linksOnPage undefined error
This commit is contained in:
parent
5a6570cba2
commit
6bd52e63bf
@ -174,7 +174,7 @@ async function processJob(job: Job, token: string) {
|
|||||||
if (!sc.cancelled) {
|
if (!sc.cancelled) {
|
||||||
const crawler = crawlToCrawler(job.data.crawl_id, sc);
|
const crawler = crawlToCrawler(job.data.crawl_id, sc);
|
||||||
|
|
||||||
const links = crawler.filterLinks((data.docs[0].linksOnPage as string[])
|
const links = crawler.filterLinks((data.docs[0].linksOnPage ?? [])
|
||||||
.map(href => crawler.filterURL(href.trim(), sc.originUrl))
|
.map(href => crawler.filterURL(href.trim(), sc.originUrl))
|
||||||
.filter(x => x !== null),
|
.filter(x => x !== null),
|
||||||
Infinity,
|
Infinity,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user