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.
This commit is contained in:
parent
74a52d9288
commit
eef38d96a9
@ -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…
Reference in New Issue
Block a user