From 9c0f071bbd1150b324a5c1b2f0e1f642da693128 Mon Sep 17 00:00:00 2001 From: Paul Donald Date: Sun, 22 Jun 2025 22:35:46 +0200 Subject: [PATCH] luci-base: check for wifi system feature before Promise.all Allows the hasSystemFeature call to complete before executing the Promise bundle. Signed-off-by: Paul Donald --- modules/luci-base/htdocs/luci-static/resources/network.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/modules/luci-base/htdocs/luci-static/resources/network.js b/modules/luci-base/htdocs/luci-static/resources/network.js index a04f4fce9e..953f4f9f68 100644 --- a/modules/luci-base/htdocs/luci-static/resources/network.js +++ b/modules/luci-base/htdocs/luci-static/resources/network.js @@ -349,6 +349,7 @@ function maskToPrefix(mask, v6) { function initNetworkState(refresh) { if (_state == null || refresh) { + const hasWifi = L.hasSystemFeature('wifi'); _init = _init || Promise.all([ L.resolveDefault(callNetworkInterfaceDump(), []), L.resolveDefault(callLuciBoardJSON(), {}), @@ -357,7 +358,7 @@ function initNetworkState(refresh) { L.resolveDefault(callLuciHostHints(), {}), getProtocolHandlers(), L.resolveDefault(uci.load('network')), - L.hasSystemFeature('wifi') ? L.resolveDefault(uci.load('wireless')) : L.resolveDefault(), + hasWifi ? L.resolveDefault(uci.load('wireless')) : L.resolveDefault(), L.resolveDefault(uci.load('luci')) ]).then(function(data) { var netifd_ifaces = data[0], -- 2.30.2