From 620c147dbd3af00742e6801a41b5b8d564537c82 Mon Sep 17 00:00:00 2001 From: liamcottle Date: Sun, 2 Feb 2025 18:30:43 +1300 Subject: [PATCH] if interface enable is a boolean, check it as a string --- src/frontend/js/Utils.js | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/src/frontend/js/Utils.js b/src/frontend/js/Utils.js index 4c8ca37..0a92957 100644 --- a/src/frontend/js/Utils.js +++ b/src/frontend/js/Utils.js @@ -143,11 +143,7 @@ class Utils { static isInterfaceEnabled(iface) { const rawValue = iface.enabled ?? iface.interface_enabled; - if (rawValue === true) { - // when enabled or interface_enabled is True it needs to return true. - return true; - } - const value = rawValue?.toLowerCase(); + const value = rawValue?.toString().toLowerCase(); return value === "on" || value === "yes" || value === "true"; }