mirror of https://github.com/vuejs/vue.git
only set option value when the value is present (make tests pass for #861)
This commit is contained in:
parent
8a351e7568
commit
cae336c00d
|
|
@ -105,8 +105,11 @@ function buildOptions (parent, options) {
|
||||||
if (typeof op === 'string') {
|
if (typeof op === 'string') {
|
||||||
el.text = el.value = op
|
el.text = el.value = op
|
||||||
} else {
|
} else {
|
||||||
el.text = op.text
|
/* jshint eqeqeq: false */
|
||||||
|
if (op.value != null) {
|
||||||
el.value = op.value
|
el.value = op.value
|
||||||
|
}
|
||||||
|
el.text = op.text || op.value || ''
|
||||||
if (op.disabled) {
|
if (op.disabled) {
|
||||||
el.disabled = true
|
el.disabled = true
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue