diff --git a/index.mjs b/index.mjs index 306f934..78f77c1 100644 --- a/index.mjs +++ b/index.mjs @@ -134,7 +134,7 @@ async function siteCrawler(hostname) { return webContents; } catch (error) { console.error(`Failed to crawl site ${hostname}:`, error); - return []; + return webContents || []; } } @@ -182,6 +182,4 @@ async function mainLoop() { } } -//mainLoop() - -main() +mainLoop()