forked from MarseyWorld/MarseyWorld
fix sorting
parent
b99cc4a8aa
commit
8b5b6a2429
|
@ -8,8 +8,7 @@ function sort_table(n) {
|
||||||
const ele = rows[i];
|
const ele = rows[i];
|
||||||
let x = rows[i].getElementsByTagName("TD")[n];
|
let x = rows[i].getElementsByTagName("TD")[n];
|
||||||
x = x.getElementsByTagName('a')[0] || x;
|
x = x.getElementsByTagName('a')[0] || x;
|
||||||
x =
|
const attr = x.dataset.time ? parseInt(x.dataset.time) : parseInt(x.innerHTML.replace(/,/g, ''));
|
||||||
const attr = x.dataset.time ? parseInt(x.dataset.time) : parseInt(x.innerHTML);
|
|
||||||
items.push({ ele, attr });
|
items.push({ ele, attr });
|
||||||
}
|
}
|
||||||
if (sortAscending[n]) {
|
if (sortAscending[n]) {
|
||||||
|
|
Loading…
Reference in New Issue