summary refs log tree commit diff
path: root/api
diff options
context:
space:
mode:
authorImAaronFR <96433859+ImAaronFR@users.noreply.github.com>2022-02-10 08:26:48 +0330
committerGitHub <noreply@github.com>2022-02-10 07:56:48 +0300
commit27f6589008e876ef5c3a8e2e8945899b4ab1e12a (patch)
tree67f4e427ed06904f605f9748935be0daaa93fd9c /api
parent[Fix] Client bug (#623) (diff)
downloadserver-27f6589008e876ef5c3a8e2e8945899b4ab1e12a.tar.xz
[Fix] Trying to remove a null element (#625)
Fix for: Uncaught TypeError: document.querySelector(...) is null
Diffstat (limited to 'api')
-rw-r--r--api/client_test/index.html7
1 files changed, 6 insertions, 1 deletions
diff --git a/api/client_test/index.html b/api/client_test/index.html
index 384c598a..39ff346d 100644
--- a/api/client_test/index.html
+++ b/api/client_test/index.html
@@ -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) {