network: fix undef errors

This commit is contained in:
2 * r + 2 * t 2025-09-13 11:17:06 +10:00
parent d90c4b6df7
commit 7e93d558d6

View file

@ -123,9 +123,9 @@ Singleton {
active: net[0] === "yes",
strength: parseInt(net[1]),
frequency: parseInt(net[2]),
ssid: net[3].replace(rep2, ":"),
ssid: net[3]?.replace(rep2, ":") ?? "",
bssid: net[4]?.replace(rep2, ":") ?? "",
security: net[5] || ""
security: net[5] ?? ""
};
}).filter(n => n.ssid && n.ssid.length > 0);