From 7dc14a0d18b09c05dfd2bc7f7791b68a3b204601 Mon Sep 17 00:00:00 2001 From: Kyle Spearrin Date: Wed, 12 Sep 2018 10:27:21 -0400 Subject: [PATCH] strip asterisk from subtitle of cards --- src/services/search.service.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/services/search.service.ts b/src/services/search.service.ts index 94518ca739..60b72853ab 100644 --- a/src/services/search.service.ts +++ b/src/services/search.service.ts @@ -45,8 +45,8 @@ export class SearchService implements SearchServiceAbstraction { (builder as any).field('subTitle', { boost: 5, extractor: (c: CipherView) => { - if (c.type === CipherType.Card && c.subTitle.indexOf('*') === 0) { - return c.subTitle.substr(1); + if (c.subTitle != null && c.type === CipherType.Card) { + return c.subTitle.replace(/\*/g, ''); } return c.subTitle; },