mirror of
https://github.com/monkeytypegame/monkeytype.git
synced 2025-10-18 03:26:07 +08:00
fixed a bug where wrong pos would be shown
This commit is contained in:
parent
a323dbccb4
commit
7f82d85e5d
1 changed files with 3 additions and 1 deletions
|
@ -792,11 +792,12 @@ class Leaderboard {
|
|||
// console.log("before duplicate remove");
|
||||
// console.log(this.board);
|
||||
let newBest = false;
|
||||
let foundAt = null;
|
||||
if (insertedAt >= 0) {
|
||||
// if (this.removeDuplicates(insertedAt, a.uid)) {
|
||||
// insertedAt = -2;
|
||||
// }
|
||||
let foundAt = this.removeDuplicates(insertedAt, a.uid);
|
||||
foundAt = this.removeDuplicates(insertedAt, a.uid);
|
||||
|
||||
if (foundAt > insertedAt) {
|
||||
//new better result
|
||||
|
@ -808,6 +809,7 @@ class Leaderboard {
|
|||
return {
|
||||
insertedAt: insertedAt,
|
||||
newBest: newBest,
|
||||
foundAt: foundAt,
|
||||
};
|
||||
} else {
|
||||
return {
|
||||
|
|
Loading…
Add table
Reference in a new issue