Skip to content

Commit

Permalink
refactor(exclusions): handles different map types
Browse files Browse the repository at this point in the history
  • Loading branch information
chapmandu committed Oct 16, 2024
1 parent 97862f0 commit 5ccfa25
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions src/assets/sitemapper.js
Original file line number Diff line number Diff line change
Expand Up @@ -322,7 +322,9 @@ export default class Sitemapper {

return modified >= this.lastmod;
})
.filter(this.isNotExcluded.bind(this))
.filter((site) => {
return this.isNotExcluded(site.loc[0])
})
.map((site) => {
if( !this.fields) {
return site.loc && site.loc[0];
Expand All @@ -349,7 +351,9 @@ export default class Sitemapper {
// Map each child url into a promise to create an array of promises
const sitemap = data.sitemapindex.sitemap
.map((map) => map.loc && map.loc[0])
.filter(this.isNotExcluded.bind(this));
.filter((url) => {
return this.isNotExcluded(url)
});

// Parse all child urls within the concurrency limit in the settings
const limit = pLimit(this.concurrency);
Expand Down

0 comments on commit 5ccfa25

Please sign in to comment.