fix assigning function on a null element
All checks were successful
Build / build (pull_request) Successful in 1m29s

This commit is contained in:
AlexisinGit 2025-09-25 17:51:09 +08:00
parent 74127aece6
commit 108333e8d5

View File

@ -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");