Skip to content

Commit

Permalink
fix(hdom): boolean attrib reset/removal
Browse files Browse the repository at this point in the history
  • Loading branch information
postspectacular committed May 1, 2018
1 parent 698438a commit a93cb98
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions packages/hdom/src/dom.ts
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,7 @@ export function setAttrib(el: Element, id: string, val: any, attribs?: any) {
}
}
} else {
el.removeAttribute(id);
el[id] ? (el[id] = null) : el.removeAttribute(id);
}
return el;
}
Expand Down Expand Up @@ -167,7 +167,7 @@ export function removeAttribs(el: Element, attribs: string[], prev: any) {
if (a.indexOf("on") === 0) {
el.removeEventListener(a.substr(2), prev[a]);
} else {
el.removeAttribute(a);
el[a] ? (el[a] = null) : el.removeAttribute(a);
}
}
}
Expand Down

0 comments on commit a93cb98

Please sign in to comment.