summaryrefslogtreecommitdiffhomepage
path: root/applications/luci-app-adblock-fast/htdocs/luci-static/resources/view/adblock-fast
diff options
context:
space:
mode:
authorStan Grishin <stangri@melmac.ca>2024-02-16 16:12:51 -0700
committerGitHub <noreply@github.com>2024-02-16 16:12:51 -0700
commit13ab72dcfb2ee5e83aee0a64feb254a0bb4e1c4b (patch)
tree9d0e28858cc121347a13abe2cbcda5de85d38411 /applications/luci-app-adblock-fast/htdocs/luci-static/resources/view/adblock-fast
parent9068c65ca113fd277871c2a55b9bed4b6814e0e6 (diff)
parentc90c34e7120fe1740c8faa46945c16a8341631db (diff)
Merge pull request #6910 from stangri/master-luci-app-adblock-fast
luci-app-adblock-fast: bugfix: dnsmasq_instance & smartdns_instance p…
Diffstat (limited to 'applications/luci-app-adblock-fast/htdocs/luci-static/resources/view/adblock-fast')
-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);