|
@@ -346,7 +346,7 @@
|
|
value(val, oldVal) {
|
|
value(val, oldVal) {
|
|
if (this.multiple) {
|
|
if (this.multiple) {
|
|
this.resetInputHeight();
|
|
this.resetInputHeight();
|
|
- if (val.length > 0 || (this.$refs.input && this.query !== '')) {
|
|
|
|
|
|
+ if ((val && val.length > 0) || (this.$refs.input && this.query !== '')) {
|
|
this.currentPlaceholder = '';
|
|
this.currentPlaceholder = '';
|
|
} else {
|
|
} else {
|
|
this.currentPlaceholder = this.cachedPlaceHolder;
|
|
this.currentPlaceholder = this.cachedPlaceHolder;
|
|
@@ -671,7 +671,7 @@
|
|
|
|
|
|
handleOptionSelect(option, byClick) {
|
|
handleOptionSelect(option, byClick) {
|
|
if (this.multiple) {
|
|
if (this.multiple) {
|
|
- const value = this.value.slice();
|
|
|
|
|
|
+ const value = (this.value || []).slice();
|
|
const optionIndex = this.getValueIndex(value, option.value);
|
|
const optionIndex = this.getValueIndex(value, option.value);
|
|
if (optionIndex > -1) {
|
|
if (optionIndex > -1) {
|
|
value.splice(optionIndex, 1);
|
|
value.splice(optionIndex, 1);
|