Update src/data/dhcp.ts

Co-authored-by: Simon Lamon <32477463+silamon@users.noreply.github.com>
This commit is contained in:
J. Nick Koston 2025-04-17 08:25:22 -10:00 committed by GitHub
parent 329fc82fb8
commit 57dca6f0d8
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -42,12 +42,12 @@ const subscribeDHCPDiscoveryUpdates = (
} }
} }
if (event.change) { if (event.change) {
for (const device_data of event.change) { for (const deviceData of event.change) {
const index = data.findIndex( const index = data.findIndex(
(d) => d.mac_address === device_data.mac_address (d) => d.mac_address === deviceData.mac_address
); );
if (index !== -1) { if (index !== -1) {
data[index] = device_data; data[index] = deviceData;
} }
} }
} }