Skip to content

Commit

Permalink
Don't expose the parser unecessarily
Browse files Browse the repository at this point in the history
  • Loading branch information
seantomburke committed Nov 8, 2024
1 parent b9f1629 commit 7611022
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/assets/sitemapper.js
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,6 @@ export default class Sitemapper {
this.fields = settings.fields || false;
this.proxyAgent = settings.proxyAgent || {};
this.exclusions = settings.exclusions || [];
this.parser = new XMLParser();
}

/**
Expand Down Expand Up @@ -221,7 +220,8 @@ export default class Sitemapper {
}

// Parse XML using fast-xml-parser
const data = this.parser.parse(responseBody.toString());
const parser = new XMLParser();
const data = parser.parse(responseBody.toString());

// return the results
return { error: null, data };
Expand Down

0 comments on commit 7611022

Please sign in to comment.