- ordering fixed

This commit is contained in:
Wiesner András 2024-04-03 12:58:43 +02:00
parent bb61000bea
commit afeda936c1
2 changed files with 2 additions and 2 deletions

View File

@ -79,7 +79,7 @@ function list_corresponding_results(gameid) {
if (n === 0) { // don't continue with processing an empty array
return;
}
results.sort((a,b) => {return Number(b["testid"]) - Number(a["testid"])}); // sort records by ID
results.sort((a,b) => {return Number(b["_id"]) - Number(a["_id"])}); // sort records by ID
results.forEach((record) => {
let test_summary_record = document.createElement("section");
test_summary_record.classList.add("test-summary-record");

View File

@ -224,7 +224,7 @@ function list_results_by_game(game) {
let n = results.length;
results.sort((a, b) => {
return Number(b["testid"]) - Number(a["testid"])
return Number(b["_id"]) - Number(a["_id"])
}); // sort records by ID
let results_by_nickname = {};