Add optional chaining when accessing device config in the wifi-iface
loop to handle cases where a referenced device doesn't exist.
Signed-off-by: Felix Fietkau <nbd@nbd.name>
(cherry picked from commit
ebd2fefea5152d032cded1ccc7cf6e731b5bbcc2)
let mlo_vif = parse_bool(data.mlo);
let radios = map(dev_names, (v) => radio_idx[v]);
radios = filter(radios, (v) => v != null);
- let radio_config = map(dev_names, (v) => devices[v].config);
+ let radio_config = map(dev_names, (v) => devices[v]?.config);
let ifname;
let mlo_created = false;