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) { export function setCustomElementData(node, prop, value) {
if (prop in node) { if (prop in node) {
node[prop] = value; node[prop] = value;
} else if (value != null) {
setAttribute(node, prop, value);
} else { } else {
node.removeAttribute(prop); setAttribute(node, prop, value);
} }
} }

Loading…
Cancel
Save