From: Tianling Shen Date: Wed, 25 Dec 2024 05:44:57 +0000 (+0800) Subject: luci-base: follow-up fix for ES6 changes X-Git-Url: http://git.lede-project.org./?a=commitdiff_plain;h=2da1efba3859df23fca35096b8e9d7e0821e0d8e;p=project%2Fluci.git luci-base: follow-up fix for ES6 changes follow-up for c2fc96cc4c6b35f19638f8c54599041ce6e39da4 Signed-off-by: Tianling Shen --- diff --git a/modules/luci-base/htdocs/luci-static/resources/uci.js b/modules/luci-base/htdocs/luci-static/resources/uci.js index 9047d5a720..d18e9d98fe 100644 --- a/modules/luci-base/htdocs/luci-static/resources/uci.js +++ b/modules/luci-base/htdocs/luci-static/resources/uci.js @@ -637,7 +637,7 @@ return baseclass.extend(/** @lends LuCI.uci.prototype */ { } /* only delete existing options */ - if (v[conf]?.[sid].hasOwnProperty(opt)) { + if (v[conf]?.[sid]?.hasOwnProperty(opt)) { d[conf] ??= { }; d[conf][sid] ??= { };