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.
pull/2867/head
Flo2410 4 months ago
parent 74a52d9288
commit eef38d96a9
No known key found for this signature in database
GPG Key ID: 8ECB00AC5216DC7F

@ -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"

Loading…
Cancel
Save