From a4a656ae2342a81dab77f635fdefeb7e0f2ee34c Mon Sep 17 00:00:00 2001 From: DominikDoom Date: Sun, 28 Apr 2024 15:47:27 +0200 Subject: [PATCH] Fix frequency sorting not matching fuzzy results --- javascript/tagAutocomplete.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/javascript/tagAutocomplete.js b/javascript/tagAutocomplete.js index f3c0cda..c6c5b27 100644 --- a/javascript/tagAutocomplete.js +++ b/javascript/tagAutocomplete.js @@ -1318,7 +1318,7 @@ async function autocomplete(textArea, prompt, fixedTag = null) { const name = r.type === ResultType.chant ? r.aliases : r.text; // Add to alias list or tag list depending on if the name includes the tagword // (the same criteria is used in the filter in calculateUsageBias) - if (aliasTypes.includes(r.type) && !name.includes(tagword)) { + if (aliasTypes.includes(r.type) && r.matchSource === "alias") { aliasNames.push(name); } else { tagNames.push(name);