diff options
author | Stan Grishin <stangri@melmac.ca> | 2024-02-14 04:45:17 +0000 |
---|---|---|
committer | Stan Grishin <stangri@melmac.ca> | 2024-02-14 04:45:17 +0000 |
commit | c90c34e7120fe1740c8faa46945c16a8341631db (patch) | |
tree | b9defd988d6aaa2f9d5a54447f530da416927be5 /applications/luci-app-adblock-fast/htdocs/luci-static | |
parent | 95893927deba789810d8aa5d067e4f119f6457f5 (diff) |
luci-app-adblock-fast: bugfix: dnsmasq_instance & smartdns_instance parsing
Signed-off-by: Stan Grishin <stangri@melmac.ca>
Diffstat (limited to 'applications/luci-app-adblock-fast/htdocs/luci-static')
-rw-r--r-- | applications/luci-app-adblock-fast/htdocs/luci-static/resources/view/adblock-fast/overview.js | 32 |
1 files changed, 18 insertions, 14 deletions
diff --git a/applications/luci-app-adblock-fast/htdocs/luci-static/resources/view/adblock-fast/overview.js b/applications/luci-app-adblock-fast/htdocs/luci-static/resources/view/adblock-fast/overview.js index e625106483..e97722317c 100644 --- a/applications/luci-app-adblock-fast/htdocs/luci-static/resources/view/adblock-fast/overview.js +++ b/applications/luci-app-adblock-fast/htdocs/luci-static/resources/view/adblock-fast/overview.js @@ -209,13 +209,15 @@ return view.extend({ section_id, "dnsmasq_instance" ); - switch (val) { - case "*": - case "-": - return val; - default: - return "+"; - } + if (val && val[0]) { + switch (val[0]) { + case "*": + case "-": + return val[0]; + default: + return "+"; + } + } else return "*"; }; o.write = function (section_id, formvalue) { L.uci.set(pkg.Name, section_id, "dnsmasq_instance", formvalue); @@ -270,13 +272,15 @@ return view.extend({ section_id, "smartdns_instance" ); - switch (val) { - case "*": - case "-": - return val; - default: - return "+"; - } + if (val && val[0]) { + switch (val[0]) { + case "*": + case "-": + return val[0]; + default: + return "+"; + } + } else return "*"; }; o.write = function (section_id, formvalue) { L.uci.set(pkg.Name, section_id, "smartdns_instance", formvalue); |