fix: docsearch link behaviour on navigate (#368)

This commit is contained in:
Kasper Fabricius Kristensen
2021-09-06 09:29:58 +02:00
committed by GitHub
parent d652b512c3
commit 4602cfc083

View File

@@ -132,7 +132,9 @@ function DocSearch({ contextualSearch, ...props }) {
const navigator = useRef({
navigate({ item }) {
let url = replaceUrl(item)
history.push(url)
//Need to type out the entire URL to prevent it from attempting to open the page
//as part of the docusaurus project. Which will fail.
window.location = `https://docs.medusa-commerce.com${url}`
},
navigateNewTab({ item }) {
let url = replaceUrl(item)