forked from rDrama/rDrama
1
0
Fork 0

table sorting: mitigate chrome bug

master
justcool393 2022-11-28 17:11:14 -06:00
parent e329746bec
commit 6b3fa2f918
1 changed files with 2 additions and 2 deletions

View File

@ -21,10 +21,10 @@ function sort_table(n) {
items.push({ ele, attr }); items.push({ ele, attr });
} }
if (sortAscending[n]) { if (sortAscending[n]) {
items.sort((a, b) => a.attr > b.attr); items.sort((a, b) => a.attr > b.attr ? 1 : -1);
sortAscending[n] = false; sortAscending[n] = false;
} else { } else {
items.sort((a, b) => a.attr < b.attr); items.sort((a, b) => a.attr < b.attr ? 1 : -1);
sortAscending[n] = true; sortAscending[n] = true;
} }