Skip to content

Commit

Permalink
refactor: clean code a bit
Browse files Browse the repository at this point in the history
  • Loading branch information
lddubeau committed Sep 12, 2019
1 parent 54f940d commit af962b4
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions lib/saxes.js
Original file line number Diff line number Diff line change
Expand Up @@ -1984,11 +1984,10 @@ class SaxesParser {
/** @private */
processAttribsNS() {
const { tag, attribList } = this;
const { name: tagName, attributes } = tag;

{
// add namespace info to tag
const { prefix, local } = this.qname(tagName);
const { prefix, local } = this.qname(tag.name);
tag.prefix = prefix;
tag.local = local;
const uri = tag.uri = this.resolve(prefix) || "";
Expand All @@ -2009,6 +2008,7 @@ class SaxesParser {
return;
}

const { attributes } = tag;
const seen = new Set();
// Note: do not apply default ns to attributes:
// http://www.w3.org/TR/REC-xml-names/#defaulting
Expand All @@ -2017,7 +2017,7 @@ class SaxesParser {
let uri;
let eqname;
if (prefix === "") {
uri = (name === "xmlns") ? XMLNS_NAMESPACE : "";
uri = name === "xmlns" ? XMLNS_NAMESPACE : "";
eqname = name;
}
else {
Expand Down

0 comments on commit af962b4

Please sign in to comment.