From 4c356cbeb4701b900ad38492f2b747a5bdfd97a7 Mon Sep 17 00:00:00 2001 From: Mouse Reeve Date: Mon, 17 Jan 2022 10:52:16 -0800 Subject: [PATCH] Case insensitive suggestions --- bookwyrm/settings.py | 2 +- bookwyrm/static/js/autocomplete.js | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/bookwyrm/settings.py b/bookwyrm/settings.py index 06fc6a371..1d1ea154d 100644 --- a/bookwyrm/settings.py +++ b/bookwyrm/settings.py @@ -14,7 +14,7 @@ VERSION = "0.2.0" PAGE_LENGTH = env("PAGE_LENGTH", 15) DEFAULT_LANGUAGE = env("DEFAULT_LANGUAGE", "English") -JS_CACHE = "a47cc2ca" +JS_CACHE = "76c5ff1f" # email EMAIL_BACKEND = env("EMAIL_BACKEND", "django.core.mail.backends.smtp.EmailBackend") diff --git a/bookwyrm/static/js/autocomplete.js b/bookwyrm/static/js/autocomplete.js index 1ae8c71a0..84474e43c 100644 --- a/bookwyrm/static/js/autocomplete.js +++ b/bookwyrm/static/js/autocomplete.js @@ -42,6 +42,8 @@ function getSuggestions(input, trie) { // Follow the trie through the provided input + input = input.toLowerCase(); + input.split("").forEach((letter) => { if (!trie) { return;