luci-app-ddns: fix wrong service with custom selected 4380/head
authorAnsuel Smith <ansuelsmth@gmail.com>
Sat, 22 Aug 2020 17:58:28 +0000 (19:58 +0200)
committerAnsuel Smith <ansuelsmth@gmail.com>
Sat, 22 Aug 2020 17:58:28 +0000 (19:58 +0200)
If custom service is selected, no service is actually set in the uci config.
Fallback to custom service if no service is detected in the config.

Fixes #4301

Signed-off-by: Ansuel Smith <ansuelsmth@gmail.com>
applications/luci-app-ddns/htdocs/luci-static/resources/view/ddns/overview.js

index 93106db62bac9818a8bb5bbf10ed0925e7af80f9..2ea4cd2d4a06e1d847aadea1345cf9617e367ed2 100644 (file)
@@ -486,7 +486,7 @@ return L.view.extend({
                o.value('-',"-- " + _("custom") + " --");
 
                o.cfgvalue = function(section_id) {
-                       return uci.get('ddns', section_id, 'service_name');
+                       return uci.get('ddns', section_id, 'service_name') || '-';
                }
 
                o.write = function(section_id, formvalue) {