Skip to content

Commit

Permalink
Also check for null-valued attributes
Browse files Browse the repository at this point in the history
  • Loading branch information
kaisermann committed Aug 21, 2018
1 parent 790f2b5 commit 2de2a7c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/shared/dom.js
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ export function removeListener(node, event, handler) {
}

export function setAttribute(node, attribute, value) {
if (value === undefined) removeAttribute(node, attribute);
if (value == null) removeAttribute(node, attribute);
else node.setAttribute(attribute, value);
}

Expand Down

0 comments on commit 2de2a7c

Please sign in to comment.