Skip to content

Supercharge your AI agents with data from the web and beyond. Building the library for superintelligence. 🔥

Update index.ts

Nicolas8916fec66c54
diff --git a/apps/api/src/scraper/WebScraper/index.ts b/apps/api/src/scraper/WebScraper/index.ts
index 66bb15de1..1bfe08ce5 100644
--- a/apps/api/src/scraper/WebScraper/index.ts
+++ b/apps/api/src/scraper/WebScraper/index.ts
@@ -278,7 +278,7 @@ export class WebScraperDataProvider {
]);
if (this.mode === "single_urls" && documents.length > 0) {
- documents[0].metadata.sitemap = sitemapData;
+ documents[0].metadata.sitemap = sitemapData ?? undefined;
} else {
documents = await this.getSitemapData(this.urls[0], documents);
}