Fix: maybe prevent unnecessary search suggestion calls
This commit is contained in:
1 parent
48e0a0e8ef
commit
191a95c55c
2 files changed
+2
-1
No files matched your search
@@ -94,6 +94,7 @@ export default function Search({ options }) {
|
||||
if (
|
||||
options.showSearchSuggestions &&
|
||||
(selectedProvider.suggestionUrl || options.suggestionUrl) && // custom providers pass url via options
|
||||
query.trim().length > 0 &&
|
||||
query.trim() !== searchSuggestions[0]
|
||||
) {
|
||||
fetch(`/api/search/searchSuggestion?query=${encodeURIComponent(query)}&providerName=${selectedProvider.name}`, {
|
||||
|
||||
Reference in new issue
Block a user