fix sorting

master
Aevann1 2022-09-10 10:45:37 +02:00
parent b99cc4a8aa
commit 8b5b6a2429
1 changed files with 1 additions and 2 deletions

View File

@ -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]) {