luci-mod-system: Set description to blank if the trigger has none

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>
(cherry picked from commit b6fb2b1697)
This commit is contained in:
Florian Eckert 2022-04-12 14:11:36 +02:00
parent 0dedf21108
commit 0c0cf782f3

View file

@ -97,7 +97,7 @@ return view.extend({
for (var i = 0; i < plugins.length; i++) { for (var i = 0; i < plugins.length; i++) {
var plugin = plugins[i]; var plugin = plugins[i];
if ( plugin.name === trigger) if ( plugin.name === trigger)
this.description = plugin.form.description || ''; this.description = plugin.form.description || ' ';
} }
return trigger; return trigger;
}; };