check if null

This commit is contained in:
liamcottle
2025-02-02 18:31:18 +13:00
parent 620c147dbd
commit 43a5a907c0

View File

@@ -143,7 +143,7 @@ class Utils {
static isInterfaceEnabled(iface) {
const rawValue = iface.enabled ?? iface.interface_enabled;
const value = rawValue?.toString().toLowerCase();
const value = rawValue?.toString()?.toLowerCase();
return value === "on" || value === "yes" || value === "true";
}