mirror of
https://github.com/liamcottle/reticulum-meshchat.git
synced 2026-04-27 16:10:32 +00:00
if interface enable is a boolean, check it as a string
This commit is contained in:
parent
4555de5836
commit
620c147dbd
1 changed files with 1 additions and 5 deletions
|
|
@ -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";
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue