From f5c18061ed3cd5333ff0b034793d9ae08838ceb6 Mon Sep 17 00:00:00 2001 From: Daniel Nilsson Date: Wed, 1 Jan 2025 10:40:19 +0100 Subject: [PATCH] luci-base: allow sort value to be reassigned Commit 234e1315073595771a7397d74a039d0eb4c1a89d changed the "val" variable to be a constant, but it's value is reassigned later. Change the variable to be declared with let instead so it can be reassigned. Signed-off-by: Daniel Nilsson --- modules/luci-base/htdocs/luci-static/resources/form.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/luci-base/htdocs/luci-static/resources/form.js b/modules/luci-base/htdocs/luci-static/resources/form.js index 8d13471043a1..e3352fe019e1 100644 --- a/modules/luci-base/htdocs/luci-static/resources/form.js +++ b/modules/luci-base/htdocs/luci-static/resources/form.js @@ -3075,7 +3075,7 @@ const CBITableSection = CBITypedSection.extend(/** @lends LuCI.form.TableSection ev.currentTarget.parentNode.querySelectorAll('tr.cbi-section-table-row').forEach(L.bind((tr, i) => { const sid = tr.getAttribute('data-sid'); const opt = tr.childNodes[index].getAttribute('data-name'); - const val = this.cfgvalue(sid, opt); + let val = this.cfgvalue(sid, opt); tr.querySelectorAll('.flash').forEach((n) => { n.classList.remove('flash')