From 4602cfc0834e21f20a2981fca171df87f2274ba5 Mon Sep 17 00:00:00 2001 From: Kasper Fabricius Kristensen <45367945+kasperkristensen@users.noreply.github.com> Date: Mon, 6 Sep 2021 09:29:58 +0200 Subject: [PATCH] fix: docsearch link behaviour on navigate (#368) --- www/docs/src/theme/SearchBar/index.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/www/docs/src/theme/SearchBar/index.js b/www/docs/src/theme/SearchBar/index.js index 8a02964519..67cca9ece3 100644 --- a/www/docs/src/theme/SearchBar/index.js +++ b/www/docs/src/theme/SearchBar/index.js @@ -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)