aboutsummaryrefslogtreecommitdiff
path: root/interface/public/verify.js
diff options
context:
space:
mode:
authorBobby <[email protected]>2022-05-03 16:20:01 -0400
committerGitHub <[email protected]>2022-05-03 16:20:01 -0400
commitf807467dca2f08060b0bd4aa6b30ed231bb383b7 (patch)
treefb511ea1d13aa022ae431163415284e55e27c1b5 /interface/public/verify.js
parent40eac9bcc99f0dc0139a9356464df66e9cf5c7dc (diff)
parentcce1d920245f7ee128bde6d2e978138cbbdc6e46 (diff)
downloadWelfare-Schemes-DMQL-f807467dca2f08060b0bd4aa6b30ed231bb383b7.tar.xz
Welfare-Schemes-DMQL-f807467dca2f08060b0bd4aa6b30ed231bb383b7.zip
Merge pull request #5 from luciferreeves/main
Working Models
Diffstat (limited to 'interface/public/verify.js')
-rw-r--r--interface/public/verify.js5
1 files changed, 4 insertions, 1 deletions
diff --git a/interface/public/verify.js b/interface/public/verify.js
index 94025f8..2351bad 100644
--- a/interface/public/verify.js
+++ b/interface/public/verify.js
@@ -10,7 +10,10 @@ if (token) {
$('#loginButton').hide();
$('#logoutButton').show();
} else {
- window.location.href = "/";
+ localStorage.removeItem("token");
+ if (window.location.pathname !== "/") {
+ window.location.href = "/";
+ }
$('#loginButton').show();
$('#logoutButton').hide();
}