Skip to content

Commit bb340c6

Browse files
committed
Fix #74 and #75
1 parent 38f9dd7 commit bb340c6

File tree

2 files changed

+4
-9
lines changed

2 files changed

+4
-9
lines changed

classList.js

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
/*
22
* classList.js: Cross-browser full element.classList implementation.
3-
* 1.2.201711092
3+
* 1.2.20171210
44
*
55
* By Eli Grey, http://eligrey.com
66
* License: Dedicated to the public domain.
@@ -94,7 +94,7 @@ classListProto.item = function (i) {
9494
return this[i] || null;
9595
};
9696
classListProto.contains = function (token) {
97-
return !~checkTokenAndGetIndex(this, token + "");
97+
return ~checkTokenAndGetIndex(this, token + "");
9898
};
9999
classListProto.add = function () {
100100
var
@@ -106,7 +106,7 @@ classListProto.add = function () {
106106
;
107107
do {
108108
token = tokens[i] + "";
109-
if (~checkTokenAndGetIndex(this, token)) {
109+
if (!~checkTokenAndGetIndex(this, token)) {
110110
this.push(token);
111111
updated = true;
112112
}

classList.min.js

+1-6
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)