Skip to content

Commit

Permalink
fix: fix scan error when result.result is not defined
Browse files Browse the repository at this point in the history
  • Loading branch information
popstas committed Apr 4, 2024
1 parent 3f3b975 commit 8074521
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/scrap-site.js
Original file line number Diff line number Diff line change
Expand Up @@ -634,6 +634,8 @@ async function scrapSite ({baseUrl, options = {}}) {
result.screenshot = getScreenshotUrl(result.response.url)
}

if (!result.result) result.result = {}; // TODO: find out why result.result is not defined sometimes, possible js error into page

result.result.mixed_content_url = mixedContentUrl;
if (result.response.url) {
// url might be malformed
Expand Down

0 comments on commit 8074521

Please sign in to comment.