Skip to content

Commit 9c4bcc1

Browse files
committed
Fix sorting by name for player-markers
1 parent 310a2e5 commit 9c4bcc1

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

BlueMapCommon/webapp/src/components/Menu/MarkerSetMenu.vue

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -58,8 +58,10 @@ export default {
5858
return marker.type === "player" && (marker.name.includesCI(this.filter.search) || marker.playerUuid.includesCI(this.filter.search));
5959
}).sort((a, b) => {
6060
if (this.filter.order === "label") {
61-
if (a.label < b.label) return -1;
62-
if (a.label > b.label) return 1;
61+
let la = a.type === "player" ? a.name : a.label;
62+
let lb = b.type === "player" ? b.name : b.label;
63+
if (la < lb) return -1;
64+
if (la > lb) return 1;
6365
return 0;
6466
}
6567
if (this.filter.order === "distance") {

0 commit comments

Comments
 (0)