From 7051b64dd00c288b325ad961ff9fbb2021e74f58 Mon Sep 17 00:00:00 2001 From: yuanyxh <15766118362@139.com> Date: Mon, 14 Oct 2024 16:40:57 +0800 Subject: [PATCH] chore: chagne --- src/router/components/Link.tsx | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/router/components/Link.tsx b/src/router/components/Link.tsx index d24193d..cd50c70 100644 --- a/src/router/components/Link.tsx +++ b/src/router/components/Link.tsx @@ -46,8 +46,12 @@ const Link: React.FC> = (props) => { } e.preventDefault(); - if (replace) history.replace(to, location); - else history.push(to, location); + + if (replace) { + history.replace(to, location); + } else { + history.push(to, location); + } }, [props] );