Skip to content

Commit 167b7f9

Browse files
committed
handle 0 properly when using v-bind for input value (fix #2015)
1 parent c6ca553 commit 167b7f9

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/directives/public/bind.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,9 @@ export default {
9292
handleSingle (attr, value) {
9393
if (inputProps[attr] && attr in this.el) {
9494
this.el[attr] = attr === 'value'
95-
? (value || '') // IE9 will set input.value to "null" for null...
95+
? value == null // IE9 will set input.value to "null" for null...
96+
? ''
97+
: value
9698
: value
9799
}
98100
// set model props

0 commit comments

Comments
 (0)