From 872d2942b482ff8dc3dd4ebc30dbe12eb090401b Mon Sep 17 00:00:00 2001 From: Laurent Cozic Date: Fri, 13 Nov 2020 22:29:28 +0000 Subject: [PATCH] All: Allow lowercase filters when doing search --- packages/lib/services/searchengine/filterParser.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/lib/services/searchengine/filterParser.ts b/packages/lib/services/searchengine/filterParser.ts index 2e9b01ea4e..3eec4b225f 100644 --- a/packages/lib/services/searchengine/filterParser.ts +++ b/packages/lib/services/searchengine/filterParser.ts @@ -8,8 +8,8 @@ interface Term { } const makeTerm = (name: string, value: string): Term => { - if (name.startsWith('-')) { return { name: name.slice(1), value: value, negated: true }; } - return { name: name, value: value, negated: false }; + if (name.startsWith('-')) { return { name: name.slice(1).toLowerCase(), value: value, negated: true }; } + return { name: name.toLowerCase(), value: value, negated: false }; }; const quoted = (s: string) => s.startsWith('"') && s.endsWith('"');