From 79b670eaea4c158bfbd8eb924ff75d5cdd09162b Mon Sep 17 00:00:00 2001 From: Gin Date: Thu, 11 May 2023 13:46:45 +0800 Subject: [PATCH] fix chants search issue --- javascript/ext_chants.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/javascript/ext_chants.js b/javascript/ext_chants.js index 3b004fb..35fe7cb 100644 --- a/javascript/ext_chants.js +++ b/javascript/ext_chants.js @@ -7,7 +7,7 @@ class ChantParser extends BaseTagParser { let tempResults = []; if (tagword !== "<" && tagword !== " x.term.toLowerCase().includes(searchTerm); + let filterCondition = x => x.terms.toLowerCase().includes(searchTerm); tempResults = chants.filter(x => filterCondition(x)); // Filter by tagword } else { tempResults = chants; @@ -17,7 +17,7 @@ class ChantParser extends BaseTagParser { let finalResults = []; tempResults.forEach(t => { let result = new AutocompleteResult(t.content.trim(), ResultType.chant) - result.meta = " Chant"; + result.meta = "Chant"; result.type = ResultType.chant; result.aliases = t.name; result.category = t.color;