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

[Fix] Trying to remove a null element (#625)

Fix for: Uncaught TypeError: document.querySelector(...) is null
This commit is contained in:
ImAaronFR 2022-02-10 08:26:48 +03:30 committed by GitHub
parent 385bdfdff4
commit 27f6589008

View File

@ -54,9 +54,14 @@
setInterval(() => {
var token = JSON.parse(localStorage.getItem("token"));
if (token) {
var logincss = document.querySelector('#logincss'),
canRemove = logincss ? logincss: "";
if(canRemove !== "") {
document.querySelector("#logincss").remove();
canRemove = "";
}
}
}, 1000);
}, 1000)
const settings = JSON.parse(localStorage.getItem("UserSettingsStore"));
if (settings && settings.locale.length <= 2) {