fix(WebScraper/sitemap): await urlsHandler to fix race condition
This commit is contained in:
@@ -103,7 +103,11 @@ export async function getLinksFromSitemap(
|
||||
)
|
||||
.map((url) => url.loc[0]);
|
||||
count += validUrls.length;
|
||||
urlsHandler(validUrls);
|
||||
|
||||
const h = urlsHandler(validUrls);
|
||||
if (h instanceof Promise) {
|
||||
await h;
|
||||
}
|
||||
}
|
||||
|
||||
return count;
|
||||
|
||||
Reference in New Issue
Block a user