Skip to content

Commit 1186d6a

Browse files
Liyukulivz
authored andcommitted
fix: search box throw a error with no suggestions (#510)
1 parent 52fd040 commit 1186d6a

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

lib/default-theme/SearchBox.vue

+3
Original file line numberDiff line numberDiff line change
@@ -118,6 +118,9 @@ export default {
118118
}
119119
},
120120
go (i) {
121+
if (!this.showSuggestions) {
122+
return
123+
}
121124
this.$router.push(this.suggestions[i].path)
122125
this.query = ''
123126
this.focusIndex = 0

0 commit comments

Comments
 (0)