mirror of
https://github.com/2009scape/2009scape.github.io.git
synced 2024-10-26 22:52:31 +02:00
Fix hiscores name being case sensitive in rank search
This commit is contained in:
parent
5969702987
commit
8b45f101f6
@ -103,7 +103,7 @@ hiscores.populatePlayerRanks = (username, result) => {
|
||||
|
||||
row.childNodes[1].replaceWith(document.createElement("td"));
|
||||
row.childNodes[1].className = "rankCol";
|
||||
let rank = (result[i - 1].findIndex(player => player.username === username) + 1)
|
||||
let rank = (result[i - 1].findIndex(player => player.username.toLowerCase() === username.toLowerCase()) + 1)
|
||||
row.childNodes[1].innerHTML = rank ? rank : `<span style="color: rgba(158, 144, 47, 0.5);">Unranked</span>`;
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user