Fix ordering to initialize result[device.Interface] after interface type checks.
This commit is contained in:
parent
1cf70b65ba
commit
e4a584f4df
@ -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"
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user