Skip to content

Commit

Permalink
fix($theme-default): When use algolia search input and the hash is Ch…
Browse files Browse the repository at this point in the history
…inese, the router will report an error (fix vuejs#2431)
  • Loading branch information
bigmeow committed Jun 8, 2020
1 parent 54b84b3 commit 90abaa5
Showing 1 changed file with 2 additions and 1 deletion.
Expand Up @@ -59,7 +59,8 @@ export default {
handleSelected: (input, event, suggestion) => {
const { pathname, hash } = new URL(suggestion.url)
const routepath = pathname.replace(this.$site.base, '/')
this.$router.push(`${routepath}${hash}`)
const _hash = decodeURIComponent(hash)
this.$router.push(`${routepath}${_hash}`)
}
}
))
Expand Down

0 comments on commit 90abaa5

Please sign in to comment.