File tree 1 file changed +3
-4
lines changed
1 file changed +3
-4
lines changed Original file line number Diff line number Diff line change @@ -7,7 +7,6 @@ var config = require('./config'),
7
7
THIS_RE = / [ ^ \w ] t h i s [ ^ \w ] / ,
8
8
BRACKET_RE_S = / \[ ' ( [ ^ ' ] + ) ' \] / g,
9
9
BRACKET_RE_D = / \[ " ( [ ^ " ] + ) " \] / g,
10
- hasClassList = 'classList' in document . documentElement ,
11
10
ViewModel // late def
12
11
13
12
var defer =
@@ -261,7 +260,7 @@ var utils = module.exports = {
261
260
* uses classList if available
262
261
*/
263
262
addClass : function ( el , cls ) {
264
- if ( hasClassList ) {
263
+ if ( el . classList ) {
265
264
el . classList . add ( cls )
266
265
} else {
267
266
var cur = ' ' + el . className + ' '
@@ -275,7 +274,7 @@ var utils = module.exports = {
275
274
* remove class for IE9
276
275
*/
277
276
removeClass : function ( el , cls ) {
278
- if ( hasClassList ) {
277
+ if ( el . classList ) {
279
278
el . classList . remove ( cls )
280
279
} else {
281
280
var cur = ' ' + el . className + ' ' ,
@@ -328,4 +327,4 @@ function enableDebug () {
328
327
}
329
328
}
330
329
}
331
- }
330
+ }
You can’t perform that action at this time.
0 commit comments