diff --git a/applications/luci-app-lldpd/htdocs/luci-static/resources/lldpd.js b/applications/luci-app-lldpd/htdocs/luci-static/resources/lldpd.js index e9c638b153..45ccce8e10 100644 --- a/applications/luci-app-lldpd/htdocs/luci-static/resources/lldpd.js +++ b/applications/luci-app-lldpd/htdocs/luci-static/resources/lldpd.js @@ -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), diff --git a/applications/luci-app-lldpd/htdocs/luci-static/resources/view/lldpd/status.js b/applications/luci-app-lldpd/htdocs/luci-static/resources/view/lldpd/status.js index 30e9d2428e..f0dc6e52fb 100644 --- a/applications/luci-app-lldpd/htdocs/luci-static/resources/view/lldpd/status.js +++ b/applications/luci-app-lldpd/htdocs/luci-static/resources/view/lldpd/status.js @@ -156,10 +156,9 @@ return L.view.extend({ /** @private */ renderNumber(v) { - if (parseInt(v)) - return v; - - return '–'; + if (v === undefined || v === null) + return '–'; + return parseInt(v); }, /** @private */