From a34489d8c983a392ce9f61b11c820bd6efa81181 Mon Sep 17 00:00:00 2001 From: EnixCoda Date: Thu, 9 Apr 2020 14:23:47 +0800 Subject: [PATCH] chore: use replace state when omitting OAuth code --- src/components/SideBar.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/components/SideBar.tsx b/src/components/SideBar.tsx index 57b94c7..9a999cb 100644 --- a/src/components/SideBar.tsx +++ b/src/components/SideBar.tsx @@ -150,7 +150,7 @@ async function trySetUpAccessTokenWithCode() { const search = parseURLSearch() if ('code' in search) { const accessToken = await platform.setOAuth(search.code) - window.history.pushState( + window.history.replaceState( {}, 'removed search param', window.location.pathname.replace(window.location.search, ''),