From ad187bde2ec62927f77cd2196bce335fdcffcee7 Mon Sep 17 00:00:00 2001 From: Chris Suich Date: Wed, 18 Jun 2025 12:30:10 -0400 Subject: [PATCH] just defaultPath Signed-off-by: Chris Suich --- .../src/reader/components/TechDocsReaderPageContent/dom.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugins/techdocs/src/reader/components/TechDocsReaderPageContent/dom.tsx b/plugins/techdocs/src/reader/components/TechDocsReaderPageContent/dom.tsx index 0837710d7a..35e847a091 100644 --- a/plugins/techdocs/src/reader/components/TechDocsReaderPageContent/dom.tsx +++ b/plugins/techdocs/src/reader/components/TechDocsReaderPageContent/dom.tsx @@ -67,7 +67,7 @@ export const useInitialRedirect = (defaultPath?: string) => { const { '*': currPath = '' } = useParams(); useLayoutEffect(() => { - if (currPath === '' && defaultPath && defaultPath !== '') { + if (currPath === '' && defaultPath) { navigate(`${location.pathname}${defaultPath}`, { replace: true }); } }, []); // eslint-disable-line react-hooks/exhaustive-deps