From bbab76bc7fd8564b448d1773b65c904a4cda4f1c Mon Sep 17 00:00:00 2001 From: SimonFJ20 Date: Thu, 26 Sep 2024 01:08:10 +0200 Subject: [PATCH] remove refer --- public/login.js | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/public/login.js b/public/login.js index a109188..de7ba7e 100644 --- a/public/login.js +++ b/public/login.js @@ -25,7 +25,10 @@ document.querySelector("#login").onsubmit = async (event) => { } const refer = decodeURIComponent(params.get("refer")); params.delete("refer") - window.location.search = params.toString(); - window.location.pathname = refer; + if (params.size === 0) { + window.location.pathname = refer; + return; + } + window.location = `${refer}?${params.toString()}`; };