summaryrefslogtreecommitdiffhomepage
path: root/libs/web/luasrc/config.lua
diff options
context:
space:
mode:
Diffstat (limited to 'libs/web/luasrc/config.lua')
-rw-r--r--libs/web/luasrc/config.lua4
1 files changed, 3 insertions, 1 deletions
diff --git a/libs/web/luasrc/config.lua b/libs/web/luasrc/config.lua
index 557303f88d..72bd5aa924 100644
--- a/libs/web/luasrc/config.lua
+++ b/libs/web/luasrc/config.lua
@@ -27,5 +27,7 @@ limitations under the License.
module("luci.config",
function(m)
- setmetatable(m, {__index = require("luci.model.uci").get_all("luci")})
+ if pcall(require, "luci.model.uci") then
+ setmetatable(m, {__index = luci.model.uci.get_all("luci")})
+ end
end) \ No newline at end of file