Update crawler.ts

This commit is contained in:
Nicolas 2024-06-24 16:52:01 -03:00 committed by GitHub
parent 08c1fa799b
commit 90b7fff366
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 1 additions and 1 deletions

View File

@ -418,7 +418,7 @@ export class WebCrawler {
const normalizedUrl = normalizeUrl(url);
const normalizedSitemapLinks = sitemapLinks.map(link => normalizeUrl(link));
// has to be greater than 0 to avoid adding the initial URL to the sitemap links, and preventing crawler to crawl
if (!normalizedSitemapLinks.includes(normalizedUrl) && sitemapLinks.length > 0) {
sitemapLinks.push(url);
}