We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent b7bc6e6 commit ab2ff32Copy full SHA for ab2ff32
src/directives/internal/class.js
@@ -32,7 +32,9 @@ module.exports = {
32
handleArray: function (value) {
33
this.cleanup(value)
34
for (var i = 0, l = value.length; i < l; i++) {
35
- addClass(this.el, value[i])
+ if (value[i]) {
36
+ addClass(this.el, value[i])
37
+ }
38
}
39
this.prevKeys = value
40
},
test/unit/specs/directives/internal/class_spec.js
@@ -47,6 +47,8 @@ if (_.inBrowser) {
47
expect(el.className).toBe('a c d')
48
dir.update()
49
expect(el.className).toBe('a')
50
+ dir.update(['e', ''])
51
+ expect(el.className).toBe('a e')
52
})
53
54
0 commit comments