Przeglądaj źródła

limitReached:Improve robustness when it does not set a default value

yoyo837 7 lat temu
rodzic
commit
216cf0c990
1 zmienionych plików z 1 dodań i 1 usunięć
  1. 1 1
      packages/select/src/option.vue

+ 1 - 1
packages/select/src/option.vue

@@ -74,7 +74,7 @@
       limitReached() {
         if (this.select.multiple) {
           return !this.itemSelected &&
-            this.select.value.length >= this.select.multipleLimit &&
+            (this.select.value || []).length >= this.select.multipleLimit &&
             this.select.multipleLimit > 0;
         } else {
           return false;