summaryrefslogtreecommitdiffhomepage
path: root/libs/cbi/luasrc/cbi.lua
diff options
context:
space:
mode:
Diffstat (limited to 'libs/cbi/luasrc/cbi.lua')
-rw-r--r--libs/cbi/luasrc/cbi.lua6
1 files changed, 5 insertions, 1 deletions
diff --git a/libs/cbi/luasrc/cbi.lua b/libs/cbi/luasrc/cbi.lua
index fbd235595f..2e788be5f9 100644
--- a/libs/cbi/luasrc/cbi.lua
+++ b/libs/cbi/luasrc/cbi.lua
@@ -173,7 +173,11 @@ end
-- UCI set
function Map.set(self, section, option, value)
- return uci.set(self.config, section, option or value, option and value)
+ if option then
+ return uci.set(self.config, section, option, value)
+ else
+ return uci.set(self.config, section, value)
+ end
end
-- UCI del