fix(crawl-status): handle null data when purging rawHtml

This commit is contained in:
Gergo Moricz 2024-08-30 20:40:45 +02:00
parent 4f92bb4bf4
commit c8e0bb93ea

View File

@ -103,10 +103,12 @@ export async function crawlStatusController(req: RequestWithAuth<CrawlStatusPara
if (data.length > 0) {
if (!doneJobs[0].data.pageOptions.includeRawHtml) {
for (let ii = 0; ii < doneJobs.length; ii++) {
if (data[ii]) {
delete data[ii].rawHtml;
}
}
}
}
res.status(200).json({
status,