From b6fb2b16971f80afcfb7c3dd1d257c60f6cced7f Mon Sep 17 00:00:00 2001 From: Florian Eckert Date: Tue, 12 Apr 2022 14:11:36 +0200 Subject: [PATCH] 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 --- .../htdocs/luci-static/resources/view/system/leds.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/luci-mod-system/htdocs/luci-static/resources/view/system/leds.js b/modules/luci-mod-system/htdocs/luci-static/resources/view/system/leds.js index c0cbd7a4f1..f34a9360c3 100644 --- a/modules/luci-mod-system/htdocs/luci-static/resources/view/system/leds.js +++ b/modules/luci-mod-system/htdocs/luci-static/resources/view/system/leds.js @@ -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; }; -- 2.30.2