diff options
Diffstat (limited to 'libs/cbi')
-rw-r--r-- | libs/cbi/luasrc/cbi.lua | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/libs/cbi/luasrc/cbi.lua b/libs/cbi/luasrc/cbi.lua index 6e0845565..7370a04c4 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 |