From 00ac47d3d4827c8913eae980ae6c8b56924c922a Mon Sep 17 00:00:00 2001 From: Aadit Kamat <30969577+aaditkamat@users.noreply.github.com> Date: Thu, 16 Nov 2023 20:52:38 -0500 Subject: [PATCH] Cache search term ignoring capitalization --- app/src/scripts/soc/soc.tsx | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/app/src/scripts/soc/soc.tsx b/app/src/scripts/soc/soc.tsx index 30084a7..c5fc1ab 100644 --- a/app/src/scripts/soc/soc.tsx +++ b/app/src/scripts/soc/soc.tsx @@ -218,9 +218,12 @@ export class SOC_API extends SOC_Generic { ): Promise { if (!phrase) return Promise.resolve(); - const search = JSON.stringify({ by: searchBy, phrase }); + const search = JSON.stringify({ + by: searchBy, + phrase: phrase.toUpperCase(), + }); if (this.fetchCache.has(search)) { - console.log("Search has already already fetched. Not fetching."); + console.log("Courses have already been fetched."); return Promise.resolve(); } console.log(