fix: fix search hit
This commit is contained in:
parent
cd5896799b
commit
ebc5b856d7
@ -70,14 +70,14 @@ export default {
|
|||||||
facetFilters: [`lang:${locale}`]
|
facetFilters: [`lang:${locale}`]
|
||||||
},
|
},
|
||||||
navigator: {
|
navigator: {
|
||||||
navigate ({ suggestionUrl }) {
|
navigate: ({ itemUrl }) => {
|
||||||
const { pathname: hitPathname } = new URL(
|
const { pathname: hitPathname } = new URL(
|
||||||
window.location.origin + suggestionUrl
|
window.location.origin + itemUrl
|
||||||
)
|
)
|
||||||
if (this.$router.history.current.path === hitPathname) {
|
if (this.$router.history.current.path === hitPathname) {
|
||||||
window.location.assign(window.location.origin + suggestionUrl)
|
window.location.assign(window.location.origin + itemUrl)
|
||||||
} else {
|
} else {
|
||||||
this.$router.push(suggestionUrl)
|
this.$router.push(itemUrl)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
Loading…
Reference in New Issue
Block a user