Skip to content

Commit 3ac5741

Browse files
committed
luci-compat: CBI skip fields that do not satisfy depends
If depends is not satisfied, the fvalue will be nil. Signed-off-by: Liangbin Lian <jjm2473@gmail.com>
1 parent 679d3b8 commit 3ac5741

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

modules/luci-compat/luasrc/cbi.lua

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1443,7 +1443,7 @@ function AbstractValue.parse(self, section, novld)
14431443
--luci.util.append(self.map.events, self.events)
14441444
end
14451445
end
1446-
else -- Unset the UCI or error
1446+
elseif fvalue ~= nil then -- Unset the UCI or error
14471447
if self.rmempty or self.optional then
14481448
if not self.alias or
14491449
not self.section.aliased or

0 commit comments

Comments
 (0)