Skip to content

Commit

Permalink
Fix #74 and #75
Browse files Browse the repository at this point in the history
  • Loading branch information
eligrey committed Dec 10, 2017
1 parent 38f9dd7 commit bb340c6
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 9 deletions.
6 changes: 3 additions & 3 deletions classList.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/*
* classList.js: Cross-browser full element.classList implementation.
* 1.2.201711092
* 1.2.20171210
*
* By Eli Grey, http://eligrey.com
* License: Dedicated to the public domain.
Expand Down Expand Up @@ -94,7 +94,7 @@ classListProto.item = function (i) {
return this[i] || null;
};
classListProto.contains = function (token) {
return !~checkTokenAndGetIndex(this, token + "");
return ~checkTokenAndGetIndex(this, token + "");
};
classListProto.add = function () {
var
Expand All @@ -106,7 +106,7 @@ classListProto.add = function () {
;
do {
token = tokens[i] + "";
if (~checkTokenAndGetIndex(this, token)) {
if (!~checkTokenAndGetIndex(this, token)) {
this.push(token);
updated = true;
}
Expand Down
7 changes: 1 addition & 6 deletions classList.min.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit bb340c6

Please sign in to comment.