luci-base: fix off-by-one in cbi_update_table()

Fixes: #5189
Fixes: f919635310 ("luci-base: batch DOM updates to prevent slowdown")
Ref: f919635310 (commitcomment-53495580)
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
This commit is contained in:
Jo-Philipp Wich 2021-07-15 08:13:31 +02:00
parent b178a33018
commit 7d9ab8d4a7

View file

@ -773,7 +773,7 @@ function cbi_update_table(table, data, placeholder) {
trows[n] = trow;
});
for (var i = 1; i < n; i++) {
for (var i = 1; i <= n; i++) {
if (rows[i])
target.replaceChild(trows[i], rows[i]);
else