Update index.mjs

This commit is contained in:
The Ghost of FOSS' Future 2024-09-15 19:39:51 -05:00 committed by GitHub
parent 017ab60428
commit ac87207398
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -117,8 +117,6 @@ function generateSearchTerm(hostname) {
const contexts = []; const contexts = [];
async function siteCrawler(hostname) { async function siteCrawler(hostname) {
try { try {
const crawled = generateSearchTerm(hostname); const crawled = generateSearchTerm(hostname);
@ -139,7 +137,7 @@ async function siteCrawler(hostname) {
} }
async function contextAdd(hostnames) { async function contextAdd(hostnames) {
const promises = hostnames.map(hostname => siteCrawler(hostname)); const promises = hostnames.map(hostname => siteCrawler(hostname) || "ERROR CRAWLING THIS SITE. IGNORE THIS DOCUMENT.");
await Promise.all(promises); await Promise.all(promises);
return contexts; return contexts;
} }