Skip to content

Commit

Permalink
fix: attributes/addClass, the wrong checking on class-name inclusion
Browse files Browse the repository at this point in the history
olegabyst committed Dec 3, 2016
1 parent 50f5658 commit 89031cf
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/attributes.js
Original file line number Diff line number Diff line change
@@ -13,7 +13,7 @@ function hasClass(v,c) {

function addClass(v,c,spacedName){
if (v.classList) { v.classList.add(c); }
else if ( spacedName.indexOf(` ${c} `) ) { v.className += ' ' + c; }
else if ( spacedName.indexOf(` ${c} `) !== -1 ) { v.className += ' ' + c; }
}

function removeClass(v,c){

0 comments on commit 89031cf

Please sign in to comment.