File tree Expand file tree Collapse file tree 2 files changed +4
-2
lines changed
test/unit/specs/directives/public Expand file tree Collapse file tree 2 files changed +4
-2
lines changed Original file line number Diff line number Diff line change @@ -132,9 +132,9 @@ export default {
132
132
}
133
133
setClass ( el , value )
134
134
} else if ( xlinkRE . test ( attr ) ) {
135
- el . setAttributeNS ( xlinkNS , attr , value )
135
+ el . setAttributeNS ( xlinkNS , attr , value === true ? '' : value )
136
136
} else {
137
- el . setAttribute ( attr , value )
137
+ el . setAttribute ( attr , value === true ? '' : value )
138
138
}
139
139
} else {
140
140
el . removeAttribute ( attr )
Original file line number Diff line number Diff line change @@ -24,6 +24,8 @@ describe('v-bind', function () {
24
24
expect ( el . hasAttribute ( 'test' ) ) . toBe ( false )
25
25
dir . update ( false )
26
26
expect ( el . hasAttribute ( 'test' ) ) . toBe ( false )
27
+ dir . update ( true )
28
+ expect ( el . getAttribute ( 'test' ) ) . toBe ( '' )
27
29
dir . update ( 0 )
28
30
expect ( el . getAttribute ( 'test' ) ) . toBe ( '0' )
29
31
} )
You can’t perform that action at this time.
0 commit comments