Skip to content

Commit

Permalink
Merge pull request #129 from MegaAntiCheat/noteSearchFix
Browse files Browse the repository at this point in the history
fix incorrect archive search predicate on player notes
  • Loading branch information
megascatterbomb authored Nov 22, 2024
2 parents db68a5b + ec17eab commit 3cfad49
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions src/Pages/PlayerHistory/PlayerHistory.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,6 @@ const PlayerHistory = () => {
const query64 = getSteamID64(query.trim());
const result =
query64 &&
query64 === query &&
![newRecent, newArchive].flat().some((p) => p.steamID64 === query64)
? query64
: undefined;
Expand Down Expand Up @@ -174,8 +173,8 @@ function search(data: ArchivePlayerInfo[], query: string, caseSensitive: boolean
{f: (p) => caseSensitive && (p.previousNames?.some((n) => n.startsWith(query)) ?? false), note: 'SEARCH_REL_PREVNAME_START_CASE'}, // Start of previous alias
{f: (p) => (p.previousNames?.some((n) => n.toLowerCase().startsWith(lQuery)) ?? false), note: 'SEARCH_REL_PREVNAME_START'},

{f: (p) => caseSensitive && (p.customData?.playerNote?.startsWith(query) ?? false), note: 'SEARCH_REL_NOTE_EXACT_CASE'}, // Exact custom note
{f: (p) => p.customData?.playerNote?.startsWith(lQuery) ?? false, note: 'SEARCH_REL_NOTE_EXACT'},
{f: (p) => caseSensitive && (p.customData?.playerNote === query), note: 'SEARCH_REL_NOTE_EXACT_CASE'}, // Exact custom note
{f: (p) => p.customData?.playerNote?.toLowerCase() === lQuery, note: 'SEARCH_REL_NOTE_EXACT'},

{f: (p) => caseSensitive && (p.customData?.playerNote?.startsWith(query) ?? false), note: 'SEARCH_REL_NOTE_START_CASE'}, // Start of custom note
{f: (p) => p.customData?.playerNote?.startsWith(lQuery) ?? false, note: 'SEARCH_REL_NOTE_START'},
Expand Down

0 comments on commit 3cfad49

Please sign in to comment.