From 4a4ff70dc283233a09b041f4e4b6477d55801b1c Mon Sep 17 00:00:00 2001 From: Samuel Vaillant Date: Tue, 18 Sep 2018 11:51:54 +0200 Subject: [PATCH] chore(docgen): add special case for edit this page on GeoSearch (#1579) --- docgen/assets/js/editThisPage.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/docgen/assets/js/editThisPage.js b/docgen/assets/js/editThisPage.js index 44f3fd1c42..f53e1b24ec 100644 --- a/docgen/assets/js/editThisPage.js +++ b/docgen/assets/js/editThisPage.js @@ -10,7 +10,10 @@ if (document.querySelector('.documentation-container')) { let pathname = document.location.pathname.replace('/react-instantsearch', ''); - if (/^\/(?:widgets)\/.+/.test(pathname)) { + // Special case for the GeoSearch + if (/^\/(?:widgets\/GeoSearch).+/.test(pathname)) { + href += '/docgen/src/widgets/GeoSearch.md'; + } else if (/^\/(?:widgets)\/.+/.test(pathname)) { href += `${apiDom}${pathname.replace('.html', '.js')}`; const instantsearchEncoded = encodeURIComponent('');