diff --git a/package-lock.json b/package-lock.json index e286fff..80f40f1 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "sitemapper", - "version": "3.2.19", + "version": "3.2.20", "lockfileVersion": 2, "requires": true, "packages": { "": { "name": "sitemapper", - "version": "3.2.19", + "version": "3.2.20", "license": "MIT", "dependencies": { "fast-xml-parser": "^4.5.0", diff --git a/package.json b/package.json index c66fc8a..e89d005 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "sitemapper", - "version": "3.2.19", + "version": "3.2.20", "description": "Parser for XML Sitemaps to be used with Robots.txt and web crawlers", "keywords": [ "parse", diff --git a/src/assets/sitemapper.js b/src/assets/sitemapper.js index 1b1abc6..b415ec4 100644 --- a/src/assets/sitemapper.js +++ b/src/assets/sitemapper.js @@ -220,7 +220,10 @@ export default class Sitemapper { } // Parse XML using fast-xml-parser - const parser = new XMLParser(); + const parser = new XMLParser({ + isArray: (tagName) => + ['sitemap', 'url'].some((value) => value === tagName), + }); const data = parser.parse(responseBody.toString());