Skip to content

Commit

Permalink
restructure a condition to check value existence
Browse files Browse the repository at this point in the history
  • Loading branch information
cherifGsoul committed Oct 8, 2018
1 parent 3eaf6f1 commit 52bd548
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions can-view-target.js
Original file line number Diff line number Diff line change
Expand Up @@ -162,10 +162,8 @@ function processNode(node, paths, location, document){
getCallback().callbacks.push({
callback: value
});
} else if (typeof value === "object") {
if (value.value && value.namespaceURI) {
el.setAttributeNS(value.namespaceURI,attrName,value.value);
}
} else if (value !== null && typeof value === "object" && value.namespaceURI) {
el.setAttributeNS(value.namespaceURI,attrName,value.value);
} else {
domMutate.setAttribute.call(el, attrName, value);
}
Expand Down

0 comments on commit 52bd548

Please sign in to comment.