From fcdf36a01cdd0431b59fc0054884147d0825cc0c Mon Sep 17 00:00:00 2001 From: Thomas Avery <43214426+Thomas-Avery@users.noreply.github.com> Date: Thu, 23 Jun 2022 09:31:24 -0500 Subject: [PATCH] [PS-766] Fix for CLI check full array of URIs in search (#2953) * Check full array of URIs in search * simplify search * Swap to helper .hasUris --- libs/common/src/services/search.service.ts | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/libs/common/src/services/search.service.ts b/libs/common/src/services/search.service.ts index 1db39e2524..c020dd299f 100644 --- a/libs/common/src/services/search.service.ts +++ b/libs/common/src/services/search.service.ts @@ -180,7 +180,11 @@ export class SearchService implements SearchServiceAbstraction { if (c.subTitle != null && c.subTitle.toLowerCase().indexOf(query) > -1) { return true; } - if (c.login && c.login.uri != null && c.login.uri.toLowerCase().indexOf(query) > -1) { + if ( + c.login && + c.login.hasUris && + c.login.uris.some((loginUri) => loginUri.uri.toLowerCase().indexOf(query) > -1) + ) { return true; } return false;