Browse Source

Select: fix an undefined bug (#3015)

杨奕 8 years ago
parent
commit
c77489a44e
1 changed files with 1 additions and 0 deletions
  1. 1 0
      packages/select/src/select.vue

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

@@ -480,6 +480,7 @@
 
       resetInputHeight() {
         this.$nextTick(() => {
+          if (!this.$refs.reference) return;
           let inputChildNodes = this.$refs.reference.$el.childNodes;
           let input = [].filter.call(inputChildNodes, item => item.tagName === 'INPUT')[0];
           input.style.height = Math.max(this.$refs.tags.clientHeight + 6, sizeMap[this.size] || 36) + 'px';