Merge pull request #1684 from kaisermann/spread-attr-style

Set style attribute correctly when spread attr present
pull/1690/head
Rich Harris 6 years ago committed by GitHub
commit fe8e31a592
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -87,7 +87,9 @@ export function setAttribute(node, attribute, value) {
export function setAttributes(node, attributes) {
for (var key in attributes) {
if (key in node) {
if (key === 'style') {
node.style.cssText = attributes[key];
} else if (key in node) {
node[key] = attributes[key];
} else {
if (attributes[key] === undefined) removeAttribute(node, key);

Loading…
Cancel
Save