From b6fc5b399aa41ef030d3fe26941138917f9220b7 Mon Sep 17 00:00:00 2001 From: megascatterbomb Date: Wed, 6 Nov 2024 15:43:32 +1300 Subject: [PATCH] fix incorrect archive search predicate on player notes --- src/Pages/PlayerHistory/PlayerHistory.tsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Pages/PlayerHistory/PlayerHistory.tsx b/src/Pages/PlayerHistory/PlayerHistory.tsx index 0a59158..17ee9d7 100644 --- a/src/Pages/PlayerHistory/PlayerHistory.tsx +++ b/src/Pages/PlayerHistory/PlayerHistory.tsx @@ -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'},