mirror of
https://github.com/tenrok/vue-select.git
synced 2026-06-16 09:10:33 +03:00
fix: don't allow empty strings to be selected (#1595)
This commit is contained in:
@@ -702,7 +702,7 @@ export default {
|
|||||||
value = this.$data._value
|
value = this.$data._value
|
||||||
}
|
}
|
||||||
|
|
||||||
if (value !== undefined && value !== null) {
|
if (value !== undefined && value !== null && value !== '') {
|
||||||
return [].concat(value)
|
return [].concat(value)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -213,7 +213,7 @@ describe('VS - Selecting Values', () => {
|
|||||||
expect(Select.vm.selectedValue).toEqual(options)
|
expect(Select.vm.selectedValue).toEqual(options)
|
||||||
})
|
})
|
||||||
|
|
||||||
fit('can select a false boolean option', async () => {
|
it('can select a false boolean option', async () => {
|
||||||
const Select = mountDefault({
|
const Select = mountDefault({
|
||||||
options: [false],
|
options: [false],
|
||||||
})
|
})
|
||||||
|
|||||||
Reference in New Issue
Block a user