luci-mod-system: Set description to blank if the trigger has none
authorFlorian Eckert <fe@dev.tdt.de>
Tue, 12 Apr 2022 12:11:36 +0000 (14:11 +0200)
committerFlorian Eckert <fe@dev.tdt.de>
Tue, 12 Apr 2022 12:14:27 +0000 (14:14 +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..f34a9360c3f83d09b3e6ce37e19f246036658908 100644 (file)
@@ -97,7 +97,7 @@ return view.extend({
                        for (var i = 0; i < plugins.length; i++) {
                                var plugin = plugins[i];
                                if ( plugin.name === trigger)
-                                       this.description = plugin.form.description || '';
+                                       this.description = plugin.form.description || ' ';
                        }
                        return trigger;
                };