luci-mod-system: Set description to blank if the trigger has none
authorFlorian Eckert <fe@dev.tdt.de>
Tue, 12 Apr 2022 08:05:34 +0000 (10:05 +0200)
committerFlorian Eckert <fe@dev.tdt.de>
Tue, 12 Apr 2022 08:05:36 +0000 (10:05 +0200)
In this case the cbi description div will not be generated and when
switching to another trigger later, attempts to change the description
div contents will fail.

Signed-off-by: Florian Eckert <fe@dev.tdt.de>
modules/luci-mod-system/htdocs/luci-static/resources/view/system/leds.js

index c0cbd7a4f1cd1d35b969f1ca5752ac6868f74b5d..d6f51d1f9b06b8645be914f1292d9cbb3af47d1a 100644 (file)
@@ -89,7 +89,7 @@ return view.extend({
                                var plugin = plugins[i];
                                if ( plugin.name === value )
                                        this.map.findElement('id', 'cbid.system.%s.trigger'.format(section))
-                                               .nextElementSibling.innerHTML = plugin.form.description || '';
+                                               .nextElementSibling.innerHTML = plugin.form.description || ' ';
                        }
                }
                o.load = function(section_id) {