diff --git a/package/network/config/wifi-scripts/files/usr/share/hostap/wifi-detect.uc b/package/network/config/wifi-scripts/files/usr/share/hostap/wifi-detect.uc index 86ec3431ea7..5f375880d2b 100644 --- a/package/network/config/wifi-scripts/files/usr/share/hostap/wifi-detect.uc +++ b/package/network/config/wifi-scripts/files/usr/share/hostap/wifi-detect.uc @@ -39,8 +39,9 @@ function cleanup() { } function wiphy_get_entry(phy, path) { - let wlan = board_data.wlan; + board_data.wlan ??= {}; + let wlan = board_data.wlan; for (let name in wlan) if (wlan[name].path == path) return wlan[name];