From 152c44185b6509ad2769f1c1bc306a0e4dd576d5 Mon Sep 17 00:00:00 2001 From: Kyle Spearrin Date: Thu, 12 Jul 2018 10:10:05 -0400 Subject: [PATCH] optimize id search --- src/angular/pipes/search-ciphers.pipe.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/angular/pipes/search-ciphers.pipe.ts b/src/angular/pipes/search-ciphers.pipe.ts index ba9c454928..e81371c4e8 100644 --- a/src/angular/pipes/search-ciphers.pipe.ts +++ b/src/angular/pipes/search-ciphers.pipe.ts @@ -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) {