AutoComplete: fix key enter (#2672)

pull/2684/head
kingwl 2017-02-05 20:46:06 -06:00 committed by baiyaaaaa
parent abb24bba24
commit f25b8b1edb
1 changed files with 2 additions and 2 deletions

View File

@ -113,7 +113,7 @@
}, 100);
},
handleKeyEnter() {
if (this.suggestionVisible) {
if (this.suggestionVisible && this.highlightedIndex >= 0 && this.highlightedIndex < this.suggestions.length) {
this.select(this.suggestions[this.highlightedIndex]);
}
},