[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
This commit is contained in:
Thomas Avery 2022-06-23 09:31:24 -05:00 committed by GitHub
parent e00fe8edae
commit fcdf36a01c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 5 additions and 1 deletions

View File

@ -180,7 +180,11 @@ export class SearchService implements SearchServiceAbstraction {
if (c.subTitle != null && c.subTitle.toLowerCase().indexOf(query) > -1) { if (c.subTitle != null && c.subTitle.toLowerCase().indexOf(query) > -1) {
return true; 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 true;
} }
return false; return false;