Fix ordering to initialize result[device.Interface] after interface type checks.

This commit is contained in:
Arindy 2025-12-28 11:24:08 +01:00
parent 1cf70b65ba
commit e4a584f4df

View File

@ -40,13 +40,13 @@ func GetDevices() map[string]map[string]Device {
writeDevices(devices)
for mac, device := range devices {
if _, ok := result[device.Interface]; !ok {
result[device.Interface] = make(map[string]Device)
}
if strings.HasPrefix(device.Interface, "br") {
device.Icon = "\uE7B0"
device.Interface = "bridge"
}
if _, ok := result[device.Interface]; !ok {
result[device.Interface] = make(map[string]Device)
}
if device.Icon == "" {
device.Icon = "\U000F0C8A"
}