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);
|
||||
i++;
|
||||
}
|
||||
while (trs.length > i) {
|
||||
trs.pop().element.remove();
|
||||
if (i === 0) {
|
||||
trs.length = 0;
|
||||
tbody.textContent = '';
|
||||
} else {
|
||||
while (trs.length > i) {
|
||||
trs.pop().element.remove();
|
||||
}
|
||||
}
|
||||
table.classList.toggle('empty', trs.length === 0);
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user