From 3169c4c653ff7faa38e24ceae6f08bf6ea40f2ff Mon Sep 17 00:00:00 2001 From: DominikDoom Date: Thu, 11 May 2023 21:17:55 +0200 Subject: [PATCH] Support searching chants by name --- javascript/ext_chants.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/javascript/ext_chants.js b/javascript/ext_chants.js index 3d3e2ff..28ba2c4 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.terms.toLowerCase().includes(searchTerm); + let filterCondition = x => x.terms.toLowerCase().includes(searchTerm) || x.name.toLowerCase().includes(searchTerm); tempResults = chants.filter(x => filterCondition(x)); // Filter by tagword } else { tempResults = chants;