From dfef56fe2729c6cf89cb51aa40438e3adae698b0 Mon Sep 17 00:00:00 2001 From: Daniel Kos Date: Wed, 5 Dec 2018 10:11:56 +0100 Subject: [PATCH] Code review fixes Feature #14280 Arvados-DCO-1.1-Signed-off-by: Daniel Kos --- src/store/search-bar/search-bar-actions.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/store/search-bar/search-bar-actions.ts b/src/store/search-bar/search-bar-actions.ts index 9d1c6ace..199ec3f9 100644 --- a/src/store/search-bar/search-bar-actions.ts +++ b/src/store/search-bar/search-bar-actions.ts @@ -307,7 +307,7 @@ export const parseSearchQuery: (query: string) => ParseSearchQuery = (searchValu 'has:' ]; - const hasKeywords = (search: string) => keywords.reduce((acc, keyword) => acc + search.indexOf(keyword) >= 0 ? 1 : 0, 0); + const hasKeywords = (search: string) => keywords.reduce((acc, keyword) => acc + (search.includes(keyword) ? 1 : 0), 0); let keywordsCnt = 0; const properties = {}; -- 2.30.2