check if null
This commit is contained in:
@@ -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";
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user