Fix sorting being case-sensitive

This commit is contained in:
Lukas Rieger (Blue) 2023-02-11 12:07:33 +01:00
parent 9c4bcc100f
commit bce498955f
No known key found for this signature in database
GPG Key ID: 2D09EC5ED2687FF2
1 changed files with 2 additions and 2 deletions

View File

@ -58,8 +58,8 @@ export default {
return marker.type === "player" && (marker.name.includesCI(this.filter.search) || marker.playerUuid.includesCI(this.filter.search));
}).sort((a, b) => {
if (this.filter.order === "label") {
let la = a.type === "player" ? a.name : a.label;
let lb = b.type === "player" ? b.name : b.label;
let la = (a.type === "player" ? a.name : a.label).toLowerCase();
let lb = (b.type === "player" ? b.name : b.label).toLowerCase();
if (la < lb) return -1;
if (la > lb) return 1;
return 0;