1
0
mirror of https://github.com/spacebarchat/server.git synced 2024-11-05 10:22:31 +01:00

Try to fix loginRedirect

This commit is contained in:
Madeline 2022-10-27 21:52:23 +11:00
parent 5ca7958ed8
commit 153a69bd36
No known key found for this signature in database
GPG Key ID: 1958E017C36F2E47

View File

@ -1,7 +1,7 @@
if (window.location.hostname !== "127.0.0.1" && window.location.hostname !== "localhost") {
const redirectIfOnLogin = () => {
const path = window.location.pathname;
if (path == "/login" || path == "/register" || !window.localStorage.getItem("token")) {
if (path == "/login" || path == "/register" /* || !window.localStorage.getItem("token") */) {
window.location.pathname = "/login";
//window.location.reload();
}