From b2bb60083ea94aad5650ab477533c83c46c4ab40 Mon Sep 17 00:00:00 2001 From: sxyazi Date: Thu, 19 Oct 2023 09:51:50 +0800 Subject: [PATCH] fix: slash --- src/theme/NotFound.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/theme/NotFound.js b/src/theme/NotFound.js index bc626c0f..2c09d52e 100644 --- a/src/theme/NotFound.js +++ b/src/theme/NotFound.js @@ -4,8 +4,8 @@ import { useEffect } from "react" export default function NotFoundWrapper(props) { useEffect(() => { - if (location.href.includes("/docs/")) { - location.href = location.href.replace("/docs/", "/") + if (location.href.includes("/docs")) { + location.href = location.href.replace("/docs", "") } }, [])