1
0
mirror of https://github.com/bitwarden/browser.git synced 2024-11-24 12:06:15 +01:00

optimize id search

This commit is contained in:
Kyle Spearrin 2018-07-12 10:10:05 -04:00
parent 1a2b8684e2
commit 152c44185b

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) {