Skip to content

Commit

Permalink
fix(hdom): update removeAttribs
Browse files Browse the repository at this point in the history
- check for attribute first, else treat as element property
  • Loading branch information
postspectacular committed Apr 17, 2019
1 parent b28e89d commit b17fb17
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/hdom/src/dom.ts
Original file line number Diff line number Diff line change
Expand Up @@ -302,7 +302,7 @@ export const removeAttribs = (el: Element, attribs: string[], prev: any) => {
if (a.indexOf("on") === 0) {
removeListener(el, a.substr(2), prev[a]);
} else {
el[a] ? (el[a] = null) : el.removeAttribute(a);
el.hasAttribute(a) ? el.removeAttribute(a) : (el[a] = null);
}
}
};
Expand Down

0 comments on commit b17fb17

Please sign in to comment.