Skip to content

Commit

Permalink
fix incorrect archive search predicate on player notes
Browse files Browse the repository at this point in the history
  • Loading branch information
megascatterbomb committed Nov 6, 2024
1 parent 662ebe1 commit b6fc5b3
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/Pages/PlayerHistory/PlayerHistory.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -174,8 +174,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 b6fc5b3

Please sign in to comment.