Skip to content

Commit

Permalink
rely in setAttribute behaviour inside setCustomElementData
Browse files Browse the repository at this point in the history
  • Loading branch information
Rich-Harris committed Dec 15, 2018
1 parent 95484b7 commit 6130241
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions src/shared/dom.js
Original file line number Diff line number Diff line change
Expand Up @@ -101,10 +101,8 @@ export function setAttributes(node, attributes) {
export function setCustomElementData(node, prop, value) {
if (prop in node) {
node[prop] = value;
} else if (value != null) {
setAttribute(node, prop, value);
} else {
node.removeAttribute(prop);
setAttribute(node, prop, value);
}
}

Expand Down

0 comments on commit 6130241

Please sign in to comment.