summaryrefslogtreecommitdiffhomepage
path: root/applications/luci-app-adblock-fast/htdocs/luci-static
diff options
context:
space:
mode:
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.js32
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);