mirror of
https://github.com/tenrok/vue-select.git
synced 2026-06-19 09:50:33 +03:00
valueAsArray to handle passed arrays
In the test suite sometimes a mutableValue array is passed when `multiple == false`. Using [].concat rather than an array literall allows valueAsArray to handle these cases. [].concat could handle the case when `multiple == true` as well.
This commit is contained in:
@@ -952,7 +952,7 @@
|
|||||||
if (this.multiple) {
|
if (this.multiple) {
|
||||||
return this.mutableValue
|
return this.mutableValue
|
||||||
} else if (this.mutableValue) {
|
} else if (this.mutableValue) {
|
||||||
return [this.mutableValue]
|
return [].concat(this.mutableValue)
|
||||||
}
|
}
|
||||||
|
|
||||||
return []
|
return []
|
||||||
|
|||||||
Reference in New Issue
Block a user