Skip to content

Commit 909c597

Browse files
committed
Only check accounts in the same zone
1 parent d182b7b commit 909c597

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

src/components/gameRecords/playerSearch.tsx

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import React from "react";
22
import { useEffect, useState, useMemo } from "react";
33

4-
import { LevelWithDelta, Level } from "../../data/types";
4+
import { LevelWithDelta, Level, getAccountZone } from "../../data/types";
55
import { searchPlayer, PlayerSearchResult } from "../../data/source/misc";
66
import { Redirect } from "react-router-dom";
77
import { generatePlayerPathById } from "./routeUtils";
@@ -106,7 +106,12 @@ export function PlayerSearch() {
106106
}
107107
const promise = searchPlayer(prefix, NUM_FETCH).then(function (players: PlayerSearchResultExt[]) {
108108
players.forEach((x) => {
109-
x.isDeleted = players.some((y) => x.nickname === y.nickname && x.latest_timestamp < y.latest_timestamp);
109+
x.isDeleted = players.some(
110+
(y) =>
111+
x.nickname === y.nickname &&
112+
getAccountZone(x.id) === getAccountZone(y.id) &&
113+
x.latest_timestamp < y.latest_timestamp
114+
);
110115
});
111116
playerSearchCache.set(prefix, players);
112117
if (!cancelled) {

0 commit comments

Comments
 (0)