mirror of
https://github.com/gethomepage/homepage.git
synced 2025-12-06 21:57:48 +01:00
Fix: maybe prevent unnecessary search suggestion calls
This commit is contained in:
@@ -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