fix: handle undefined inbounds/outbounds in traffic tab

API may return nodes without inbounds/outbounds arrays. Made fields
optional in NodeRealtimeStats and added null safety guards in TrafficTab.
This commit is contained in:
Fringg
2026-03-28 23:33:06 +03:00
parent 5d7b94fc48
commit 06f6cbeb8e
2 changed files with 6 additions and 6 deletions

View File

@@ -174,8 +174,8 @@ export interface NodeRealtimeStats {
uploadBytes: number;
totalBytes: number;
usersOnline: number;
inbounds: InboundTraffic[];
outbounds: InboundTraffic[];
inbounds?: InboundTraffic[];
outbounds?: InboundTraffic[];
}
// Squads