luci-base: follow-up fix for ES6 changes
authorTianling Shen <cnsztl@immortalwrt.org>
Wed, 25 Dec 2024 05:44:57 +0000 (13:44 +0800)
committerPaul Donald <newtwen+github@gmail.com>
Wed, 25 Dec 2024 15:41:42 +0000 (15:41 +0000)
follow-up for c2fc96cc4c6b35f19638f8c54599041ce6e39da4

Signed-off-by: Tianling Shen <cnsztl@immortalwrt.org>
modules/luci-base/htdocs/luci-static/resources/uci.js

index 9047d5a72080c035b1f0937797ea58bf18413776..d18e9d98fe10d8f606b95391f1a1936b25407a62 100644 (file)
@@ -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] ??= { };