From e39ae5c3512b594a55a4a0102d5fa309310666ed Mon Sep 17 00:00:00 2001 From: zxkws Date: Thu, 24 Oct 2024 22:28:39 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E4=BF=AE=E5=A4=8D=20changeState=20?= =?UTF-8?q?=E6=96=B9=E6=B3=95=E8=B0=83=E7=94=A8=E5=AF=BC=E8=87=B4=E7=9A=84?= =?UTF-8?q?=20Illegal=20invocation=20=E9=94=99=E8=AF=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- packages/icestark-app/src/AppLink.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/icestark-app/src/AppLink.tsx b/packages/icestark-app/src/AppLink.tsx index 3e2632bb..514b5ff8 100644 --- a/packages/icestark-app/src/AppLink.tsx +++ b/packages/icestark-app/src/AppLink.tsx @@ -45,7 +45,7 @@ const AppLink = (props: AppLinkProps) => { /* * Bind `replaceState` and `pushState` to window to avoid illegal invocation error */ - const changeState = window.history[replace ? 'replaceState' : 'pushState'].bind(window); + const changeState = window.history[replace ? 'replaceState' : 'pushState'].bind(window.history); changeState(_state ?? {}, null, linkTo); }}