Update fireEngine.ts

This commit is contained in:
Nicolas 2024-08-20 21:16:33 -03:00
parent 1b3ad60a2c
commit 819ad50af3

View File

@ -158,7 +158,8 @@ export async function scrapWithFireEngine({
};
}
const contentType = checkStatusResponse.data.responseHeaders["content-type"];
const contentType = checkStatusResponse.data.responseHeaders?.["content-type"];
if (contentType && contentType.includes("application/pdf")) {
const { content, pageStatusCode, pageError } = await fetchAndProcessPdf(
url,