Skip to content

Commit

Permalink
better class handling
Browse files Browse the repository at this point in the history
  • Loading branch information
ceymard committed Jun 4, 2019
1 parent d4fc12f commit 9aae68a
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/mixins.ts
Original file line number Diff line number Diff line change
Expand Up @@ -317,6 +317,7 @@ function _apply_class(node: Element, c: any) {
}

function _remove_class(node: Element, c: string) {
c = c == null ? null : c.toString()
if (!c) return
for (var _ of c.split(/\s+/g))
if (_) node.classList.remove(_)
Expand Down

0 comments on commit 9aae68a

Please sign in to comment.