Fixed setting the custom provider as the selected search provider.

This commit is contained in:
Flo2410 2024-01-29 20:42:45 +00:00
parent 3e74645db3
commit a442c4d968
No known key found for this signature in database
GPG Key ID: 8ECB00AC5216DC7F
2 changed files with 3 additions and 6 deletions

View File

@ -121,7 +121,7 @@ export default function QuickLaunch({
if (searchString.trim() !== searchSuggestions[0]) {
fetch(
`/api/search/searchSuggestion?query=${encodeURIComponent(searchString)}&providerName=${
searchProvider.name
searchProvider.name ?? "Custom"
}`,
{ signal: abortController.signal },
)

View File

@ -212,11 +212,8 @@ function Home({ initialSettings }) {
searchProvider = getStoredProvider() ?? searchProviders[searchWidget.options.provider[0]];
} else if (searchWidget.options?.provider === "custom") {
searchProvider = {
...searchProviders.custom,
...{
url: searchWidget.options.url,
suggestionUrl: searchWidget.options.suggestionUrl,
},
url: searchWidget.options.url,
suggestionUrl: searchWidget.options.suggestionUrl,
};
} else {
searchProvider = searchProviders[searchWidget.options?.provider];