From: Dirk Brenken Date: Wed, 5 Jul 2017 19:31:56 +0000 (+0200) Subject: luci-app-adblock: bugfix X-Git-Url: http://git.lede-project.org./?a=commitdiff_plain;h=985f0f5118c01916c9d1aac93f2198dd0517c9f0;p=project%2Fluci.git luci-app-adblock: bugfix * fix nil error on overview page Signed-off-by: Dirk Brenken --- diff --git a/applications/luci-app-adblock/luasrc/model/cbi/adblock/overview_tab.lua b/applications/luci-app-adblock/luasrc/model/cbi/adblock/overview_tab.lua index 6d01e13278..68f9c8897e 100644 --- a/applications/luci-app-adblock/luasrc/model/cbi/adblock/overview_tab.lua +++ b/applications/luci-app-adblock/luasrc/model/cbi/adblock/overview_tab.lua @@ -7,7 +7,7 @@ local sys = require("luci.sys") local json = require("luci.jsonc") local adbinput = uci.get("adblock", "global", "adb_rtfile") or "/tmp/adb_runtime.json" local dnspath = uci.get("adblock", "global", "adb_dnsdir") or "" -local parse = json.parse(fs.readfile(adbinput)) +local parse = json.parse(fs.readfile(adbinput) or "") if parse ~= nil then version = parse.data.adblock_version domains = parse.data.blocked_domains