luci-app-lldpd: fix 'dImg is not defined'
authorPaul Donald <redacted>
Wed, 4 Mar 2026 00:41:02 +0000 (01:41 +0100)
committerPaul Donald <redacted>
Wed, 4 Mar 2026 00:41:02 +0000 (01:41 +0100)
follow-up to b07c6833de87f89a0b9b41c0c33a7d32bd314d58

Signed-off-by: Paul Donald <redacted>
applications/luci-app-lldpd/htdocs/luci-static/resources/view/lldpd/status.js

index 1c6bbdb43d13371fc7ed4a9af3be546675d9ad79..30e9d2428e2a679bd55c4f6de6ebf36ff6333f65 100644 (file)
@@ -341,13 +341,14 @@ return L.view.extend({
                //   ...
                // row[N] - contents for N-th cell in row
                //
+               let dImg;
                if (row.length < 2)
                        return row;
 
                for (let i = 1; i < row.length; i++) {
                        if (i == 1) {
                                // Fold/unfold image appears only in first column
-                               const dImg = E('div', { 'style': 'padding: 0 8px 0 0;' }, [
+                               dImg = E('div', { 'style': 'padding: 0 8px 0 0;' }, [
                                        E('img', { 'width': '16px', 'src': this.getFoldingImage(unfolded) }),
                                ]);
                        }
git clone https://git.99rst.org/PROJECT