summaryrefslogtreecommitdiffhomepage
path: root/libs/cbi/luasrc
diff options
context:
space:
mode:
Diffstat (limited to 'libs/cbi/luasrc')
-rw-r--r--libs/cbi/luasrc/cbi.lua12
1 files changed, 7 insertions, 5 deletions
diff --git a/libs/cbi/luasrc/cbi.lua b/libs/cbi/luasrc/cbi.lua
index 6e08455655..7370a04c46 100644
--- a/libs/cbi/luasrc/cbi.lua
+++ b/libs/cbi/luasrc/cbi.lua
@@ -57,14 +57,16 @@ function load(cbimap)
luci.util.extfenv(func, "translate", luci.i18n.translate)
luci.util.extfenv(func, "translatef", luci.i18n.translatef)
- local map = func()
+ local maps = {func()}
- if not instanceof(map, Map) then
- error("CBI map returns no valid map object!")
- return nil
+ for i, map in ipairs(maps) do
+ if not instanceof(map, Map) then
+ error("CBI map returns no valid map object!")
+ return nil
+ end
end
- return map
+ return maps
end
-- Node pseudo abstract class