diff options
Diffstat (limited to 'libs/web/luasrc')
-rw-r--r-- | libs/web/luasrc/config.lua | 17 |
1 files changed, 6 insertions, 11 deletions
diff --git a/libs/web/luasrc/config.lua b/libs/web/luasrc/config.lua index dd3e01734e..258f5e655f 100644 --- a/libs/web/luasrc/config.lua +++ b/libs/web/luasrc/config.lua @@ -25,14 +25,9 @@ limitations under the License. ]]-- -local util = require "luci.util" - -local pcall = pcall -local require = require - - -module "luci.config" - -pcall(function() - setmetatable(_M, {__index=require "luci.model.uci".cursor():get_all("luci")}) -end) +module("luci.config", + function(m) + if pcall(require, "luci.model.uci") then + setmetatable(m, {__index = luci.model.uci.cursor():get_all("luci")}) + end + end)
\ No newline at end of file |