Skip to content

Commit

Permalink
fix: SVGElement doesn't prototype, closes #246
Browse files Browse the repository at this point in the history
  • Loading branch information
Guillaume Chau committed Apr 28, 2019
1 parent 82f2fd3 commit 975e04b
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/utils.js
Expand Up @@ -30,7 +30,7 @@ export function addClasses (el, classes) {
classList.push(newClass)
}
})
if (el.prototype && el instanceof SVGElement) {
if (el instanceof SVGElement) {
el.setAttribute('class', classList.join(' '))
} else {
el.className = classList.join(' ')
Expand Down Expand Up @@ -58,7 +58,7 @@ export function removeClasses (el, classes) {
classList.splice(index, 1)
}
})
if (el.prototype && el instanceof SVGElement) {
if (el instanceof SVGElement) {
el.setAttribute('class', classList.join(' '))
} else {
el.className = classList.join(' ')
Expand Down

0 comments on commit 975e04b

Please sign in to comment.