Skip to content
This repository has been archived by the owner on Jun 17, 2022. It is now read-only.

Commit

Permalink
strip asterisk from subtitle of cards
Browse files Browse the repository at this point in the history
  • Loading branch information
kspearrin committed Sep 12, 2018
1 parent cf795bc commit 7dc14a0
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/services/search.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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;
},
Expand Down

0 comments on commit 7dc14a0

Please sign in to comment.