Fix: optimize row removing when i === 0
This commit is contained in:
parent
2fb16529fb
commit
47c6834331
|
@ -105,8 +105,13 @@ var linterReport = (() => {
|
||||||
tr.update(anno);
|
tr.update(anno);
|
||||||
i++;
|
i++;
|
||||||
}
|
}
|
||||||
while (trs.length > i) {
|
if (i === 0) {
|
||||||
trs.pop().element.remove();
|
trs.length = 0;
|
||||||
|
tbody.textContent = '';
|
||||||
|
} else {
|
||||||
|
while (trs.length > i) {
|
||||||
|
trs.pop().element.remove();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
table.classList.toggle('empty', trs.length === 0);
|
table.classList.toggle('empty', trs.length === 0);
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user