diff options
author | tdro <tdro@noreply.example.com> | 2022-07-14 10:16:53 -0400 |
---|---|---|
committer | tdro <tdro@noreply.example.com> | 2022-07-14 10:16:53 -0400 |
commit | 4f1a667965e9c4bf92fe6a5886d7fed883b22ed7 (patch) | |
tree | 736d640684737ffe392c687873cdee662728fd62 /static | |
parent | 5d381dc1e70a28828bfbab759d5ffc83e93527eb (diff) | |
download | canory-4f1a667965e9c4bf92fe6a5886d7fed883b22ed7.tar.gz canory-4f1a667965e9c4bf92fe6a5886d7fed883b22ed7.tar.bz2 canory-4f1a667965e9c4bf92fe6a5886d7fed883b22ed7.zip |
static/js/fixedsearch: Set title
Start setup for searching other categories.
Diffstat (limited to 'static')
-rw-r--r-- | static/js/fixedsearch.ts | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/static/js/fixedsearch.ts b/static/js/fixedsearch.ts index 2b0abda..6e77b3f 100644 --- a/static/js/fixedsearch.ts +++ b/static/js/fixedsearch.ts @@ -170,14 +170,15 @@ } else { dropdown.removeAttribute("hidden"); for (const string in results.slice(0, 10)) { + const title = results[string].obj.title; let highlight = fuzzysort.highlight( - fuzzysort.single(term, results[string].obj.title), + fuzzysort.single(term, title), "<span>", "</span>", ); if (highlight === null) { - highlight = results[string].obj.title; + highlight = title; } items = items + |