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:
parent
385bdfdff4
commit
27f6589008
@ -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) {
|
||||
|
Loading…
Reference in New Issue
Block a user