strip asterisk from subtitle of cards

This commit is contained in:
Kyle Spearrin 2018-09-12 10:27:21 -04:00
parent cf795bc39c
commit 7dc14a0d18
1 changed files with 2 additions and 2 deletions

View File

@ -45,8 +45,8 @@ export class SearchService implements SearchServiceAbstraction {
(builder as any).field('subTitle', { (builder as any).field('subTitle', {
boost: 5, boost: 5,
extractor: (c: CipherView) => { extractor: (c: CipherView) => {
if (c.type === CipherType.Card && c.subTitle.indexOf('*') === 0) { if (c.subTitle != null && c.type === CipherType.Card) {
return c.subTitle.substr(1); return c.subTitle.replace(/\*/g, '');
} }
return c.subTitle; return c.subTitle;
}, },