optimize id search

This commit is contained in:
Kyle Spearrin 2018-07-12 10:10:05 -04:00
parent 1a2b8684e2
commit 152c44185b
1 changed files with 1 additions and 1 deletions

View File

@ -36,7 +36,7 @@ export class SearchCiphersPipe implements PipeTransform {
if (this.onlySearchName) {
return false;
}
if (c.id.substr(0, 8) === searchText) {
if (searchText.length >= 8 && c.id.startsWith(searchText)) {
return true;
}
if (c.subTitle != null && c.subTitle.toLowerCase().indexOf(searchText) > -1) {