Skip to content

Commit

Permalink
use regex in multi-class split
Browse files Browse the repository at this point in the history
  • Loading branch information
yyx990803 committed Apr 6, 2016
1 parent 1ab4528 commit 79442b3
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/directives/internal/class.js
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ function toggleClasses (el, key, fn) {
// The key contains one or more space characters.
// Since a class name doesn't accept such characters, we
// treat it as multiple classes.
var keys = key.split(' ')
var keys = key.split(/\s+/)
for (var i = 0, l = keys.length; i < l; i++) {
fn(el, keys[i])
}
Expand Down

0 comments on commit 79442b3

Please sign in to comment.