From 314bc40faea23c31ab9cea4f11977e0f351359d9 Mon Sep 17 00:00:00 2001 From: buzz-lightsnack-2007 <73412182+buzz-lightsnack-2007@users.noreply.github.com> Date: Fri, 29 Mar 2024 21:45:32 +0800 Subject: [PATCH] add null value detection when enabling --- gui/scripts/windowman.JS | 17 +++++++++++------ 1 file changed, 11 insertions(+), 6 deletions(-) diff --git a/gui/scripts/windowman.JS b/gui/scripts/windowman.JS index d88f4a6..d8943c3 100644 --- a/gui/scripts/windowman.JS +++ b/gui/scripts/windowman.JS @@ -324,12 +324,17 @@ class windowman { if (input_elements) { input_elements.forEach((input_element) => { - (async () => { - input_element.disabled = - (await secretariat.read( - input_element.getAttribute("data-enable"), - )) == null; - })(); + if (input_element.getAttribute("data-enable")) { + (async () => { + input_element.disabled = + (await secretariat.read( + input_element.getAttribute("data-enable"), + )) == null || + (await secretariat.read( + input_element.getAttribute("data-enable"), + )); + })(); + } }); } }