From e4a584f4dfff7edd5a9bac81835bf8c709251965 Mon Sep 17 00:00:00 2001 From: Arindy Date: Sun, 28 Dec 2025 11:24:08 +0100 Subject: [PATCH] Fix ordering to initialize `result[device.Interface]` after interface type checks. --- apis/networking/main.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/apis/networking/main.go b/apis/networking/main.go index 006cd45..1366741 100644 --- a/apis/networking/main.go +++ b/apis/networking/main.go @@ -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" }