luci-base: firewall.js: gracefully handle missing uci configuration
authorJo-Philipp Wich <jo@mein.io>
Tue, 28 Apr 2020 07:44:11 +0000 (09:44 +0200)
committerJo-Philipp Wich <jo@mein.io>
Thu, 7 May 2020 17:40:49 +0000 (19:40 +0200)
Ref: https://forum.openwrt.org/t/luci-rpc-error/61760
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
(cherry picked from commit a8d85ed71a14c85bbfca0532bb721f5f89a39845)

modules/luci-base/htdocs/luci-static/resources/firewall.js

index 4a15312407e758ee27c3504ca5e9831c44decf91..40a0354446d22d31421c9b66b5bc196b994f44e9 100644 (file)
@@ -5,7 +5,7 @@
 
 
 function initFirewallState() {
-       return uci.load('firewall');
+       return L.resolveDefault(uci.load('firewall'));
 }
 
 function parseEnum(s, values) {