diff options
author | Jo-Philipp Wich <jo@mein.io> | 2022-06-21 00:07:04 +0200 |
---|---|---|
committer | Jo-Philipp Wich <jo@mein.io> | 2022-06-21 00:07:48 +0200 |
commit | 340183786e5441197141efaf7d8cf0e682047bfe (patch) | |
tree | 80db886b8dc206f0dcdef2872d23459393f195dc /protocols/luci-proto-wireguard | |
parent | 4769bf11aa5d33cda4785faec8046c67cb51a606 (diff) |
luci-proto-wireguard: gracefully deal with missing uci configs
The /etc/config/ddns in particular might not be present on the system,
don't fail if it is absent.
Fixes: #5838
Fixes: 9ba20645b0 ("luci-proto-wireguard: rewrite protocol handler")
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
Diffstat (limited to 'protocols/luci-proto-wireguard')
-rw-r--r-- | protocols/luci-proto-wireguard/htdocs/luci-static/resources/protocol/wireguard.js | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/protocols/luci-proto-wireguard/htdocs/luci-static/resources/protocol/wireguard.js b/protocols/luci-proto-wireguard/htdocs/luci-static/resources/protocol/wireguard.js index 6fb8b9a398..e2abd3b71d 100644 --- a/protocols/luci-proto-wireguard/htdocs/luci-static/resources/protocol/wireguard.js +++ b/protocols/luci-proto-wireguard/htdocs/luci-static/resources/protocol/wireguard.js @@ -686,8 +686,8 @@ return network.registerProtocol('wireguard', { return Promise.all([ network.getWANNetworks(), network.getWAN6Networks(), - uci.load('ddns'), - uci.load('system'), + L.resolveDefault(uci.load('ddns')), + L.resolveDefault(uci.load('system')), parent.save(null, true) ]).then(function(data) { var hostnames = []; |