rely in setAttribute behaviour inside setCustomElementData

pull/1887/head
Rich Harris 6 years ago
parent 95484b71c1
commit 6130241212

@ -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);
}
}

Loading…
Cancel
Save