Skip to content
This repository has been archived by the owner on Jun 17, 2022. It is now read-only.

Commit

Permalink
trim search term
Browse files Browse the repository at this point in the history
  • Loading branch information
kspearrin committed Jul 6, 2018
1 parent b9a15d7 commit e25ad93
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/angular/pipes/search-ciphers.pipe.ts
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ export class SearchCiphersPipe implements PipeTransform {
return ciphers;
}

searchText = searchText.toLowerCase();
searchText = searchText.trim().toLowerCase();
return ciphers.filter((c) => {
if (c.name != null && c.name.toLowerCase().indexOf(searchText) > -1) {
return true;
Expand Down
2 changes: 1 addition & 1 deletion src/angular/pipes/search.pipe.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ export class SearchPipe implements PipeTransform {
return items;
}

searchText = searchText.toLowerCase();
searchText = searchText.trim().toLowerCase();
return items.filter((i) => {
if (prop1 != null && i[prop1] != null && i[prop1].toString().toLowerCase().indexOf(searchText) > -1) {
return true;
Expand Down

0 comments on commit e25ad93

Please sign in to comment.