From: Jo-Philipp Wich Date: Tue, 28 Apr 2020 07:44:11 +0000 (+0200) Subject: luci-base: firewall.js: gracefully handle missing uci configuration X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=49185a307368d68b6c0f169d71635f4bfc278358;p=oweals%2Fluci.git luci-base: firewall.js: gracefully handle missing uci configuration Ref: https://forum.openwrt.org/t/luci-rpc-error/61760 Signed-off-by: Jo-Philipp Wich (cherry picked from commit a8d85ed71a14c85bbfca0532bb721f5f89a39845) --- diff --git a/modules/luci-base/htdocs/luci-static/resources/firewall.js b/modules/luci-base/htdocs/luci-static/resources/firewall.js index 4a1531240..40a035444 100644 --- a/modules/luci-base/htdocs/luci-static/resources/firewall.js +++ b/modules/luci-base/htdocs/luci-static/resources/firewall.js @@ -5,7 +5,7 @@ function initFirewallState() { - return uci.load('firewall'); + return L.resolveDefault(uci.load('firewall')); } function parseEnum(s, values) {