From 108333e8d5c71ec71c2aede5241f4066c719447e Mon Sep 17 00:00:00 2001 From: AlexisinGit <136088944+AlexisinGit@users.noreply.github.com> Date: Thu, 25 Sep 2025 17:51:09 +0800 Subject: [PATCH] fix assigning function on a null element --- static/webui/script.js | 1 + 1 file changed, 1 insertion(+) diff --git a/static/webui/script.js b/static/webui/script.js index a7e214bf..395126b5 100644 --- a/static/webui/script.js +++ b/static/webui/script.js @@ -3214,6 +3214,7 @@ document.querySelectorAll("#account-cheats input[type=checkbox]").forEach(elm => document.querySelectorAll("#account-cheats .input-group").forEach(grp => { const input = grp.querySelector("input"); const btn = grp.querySelector("button"); + if (!input || !btn) return; input.oninput = input.onchange = function () { btn.classList.remove("btn-secondary"); btn.classList.add("btn-primary");