luci-app-lldpd: correctness fixes
authorPaul Donald <redacted>
Mon, 25 May 2026 21:18:47 +0000 (00:18 +0300)
committerPaul Donald <redacted>
Wed, 27 May 2026 12:49:46 +0000 (15:49 +0300)
Signed-off-by: Paul Donald <redacted>
applications/luci-app-lldpd/htdocs/luci-static/resources/lldpd.js
applications/luci-app-lldpd/htdocs/luci-static/resources/view/lldpd/status.js

index e9c638b1531f4727df8ff682af49d5630f8e292b..45ccce8e10475e22dd73cdafb799bc8719a9e387 100644 (file)
@@ -184,7 +184,7 @@ const CBIMultiIOSelect = form.MultiValue.extend({
 
        renderWidget(section_id, option_index, cfgvalue) {
                const value = (cfgvalue != null) ? cfgvalue : this.default ? this.default : '';
-               const choices = this.transformChoices() ? this.transformChoices() : '';
+               const choices = this.transformChoices() || '';
 
                const widget = new ui.Dropdown(L.toArray(value), choices, {
                        id:                             this.cbid(section_id),
index 30e9d2428e2a679bd55c4f6de6ebf36ff6333f65..f0dc6e52fbc2b69b0f2c84966a607a6eea1a1ee6 100644 (file)
@@ -156,10 +156,9 @@ return L.view.extend({
 
        /** @private */
        renderNumber(v) {
-               if (parseInt(v))
-                       return v;
-
-               return '&#8211;';
+               if (v === undefined || v === null)
+                       return '&#8211;';
+               return parseInt(v);
        },
 
        /** @private */
git clone https://git.99rst.org/PROJECT