Skip to content

Commit

Permalink
fix(AutoComplete): fix add(undefined)
Browse files Browse the repository at this point in the history
  • Loading branch information
vvpvvp committed Jan 10, 2019
1 parent 62b358e commit 90f96aa
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/components/autocomplete/autocomplete.vue
Original file line number Diff line number Diff line change
Expand Up @@ -451,7 +451,11 @@ export default {
if (this.multiple) {
this.objects.push(utils.copy(data))
} else {
this.object = utils.copy(data)
if (data === null || data === undefined) {
this.object = { key: null, title: null, value: null };
} else {
this.object = utils.copy(data)
}
}
this.tempValue = null
},
Expand Down

0 comments on commit 90f96aa

Please sign in to comment.