Skip to content

Commit

Permalink
fix: don't allow empty strings to be selected (#1595)
Browse files Browse the repository at this point in the history
  • Loading branch information
sagalbot authored Feb 19, 2022
1 parent 673e621 commit 93c479e
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/components/Select.vue
Original file line number Diff line number Diff line change
Expand Up @@ -702,7 +702,7 @@ export default {
value = this.$data._value
}
if (value !== undefined && value !== null) {
if (value !== undefined && value !== null && value !== '') {
return [].concat(value)
}
Expand Down
2 changes: 1 addition & 1 deletion tests/unit/Selecting.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -213,7 +213,7 @@ describe('VS - Selecting Values', () => {
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({
options: [false],
})
Expand Down

0 comments on commit 93c479e

Please sign in to comment.