From 1186d6ab2555b601be7e769ae437d06db6208f5b Mon Sep 17 00:00:00 2001 From: Liyuk Date: Mon, 28 May 2018 13:35:15 +0800 Subject: [PATCH] fix: search box throw a error with no suggestions (#510) --- lib/default-theme/SearchBox.vue | 3 +++ 1 file changed, 3 insertions(+) diff --git a/lib/default-theme/SearchBox.vue b/lib/default-theme/SearchBox.vue index 395bdce4f9..2da178f985 100644 --- a/lib/default-theme/SearchBox.vue +++ b/lib/default-theme/SearchBox.vue @@ -118,6 +118,9 @@ export default { } }, go (i) { + if (!this.showSuggestions) { + return + } this.$router.push(this.suggestions[i].path) this.query = '' this.focusIndex = 0