File tree Expand file tree Collapse file tree 1 file changed +7
-2
lines changed
src/components/gameRecords Expand file tree Collapse file tree 1 file changed +7
-2
lines changed Original file line number Diff line number Diff line change 11import React from "react" ;
22import { useEffect , useState , useMemo } from "react" ;
33
4- import { LevelWithDelta , Level } from "../../data/types" ;
4+ import { LevelWithDelta , Level , getAccountZone } from "../../data/types" ;
55import { searchPlayer , PlayerSearchResult } from "../../data/source/misc" ;
66import { Redirect } from "react-router-dom" ;
77import { 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 ) {
You can’t perform that action at this time.
0 commit comments