From eef38d96a9c4e72498c26daa60fc42b6f01b6721 Mon Sep 17 00:00:00 2001 From: Flo2410 Date: Thu, 8 Feb 2024 18:55:41 +0000 Subject: [PATCH] Fix: also trim searchSuggestions[0] for comparison with searchString This fixes an issue where the searchSuggestions[0] would end with a space and therefor not match the searchString which is trimmed. --- src/components/quicklaunch.jsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/components/quicklaunch.jsx b/src/components/quicklaunch.jsx index 23f7cef9..aaa40493 100644 --- a/src/components/quicklaunch.jsx +++ b/src/components/quicklaunch.jsx @@ -120,7 +120,7 @@ export default function QuickLaunch({ }); if (showSearchSuggestions && searchProvider.suggestionUrl) { - if (searchString.trim() !== searchSuggestions[0]) { + if (searchString.trim() !== searchSuggestions[0]?.trim()) { fetch( `/api/search/searchSuggestion?query=${encodeURIComponent(searchString)}&providerName=${ searchProvider.name ?? "Custom"