mirror of
https://github.com/karl0ss/homepage.git
synced 2025-04-29 12:03:41 +01:00
lint support custom search provider in quicklaunch
This commit is contained in:
parent
ad299e9c94
commit
046f2986a8
@ -200,14 +200,12 @@ function Home({ initialSettings }) {
|
|||||||
if (Array.isArray(searchWidget.options?.provider)) {
|
if (Array.isArray(searchWidget.options?.provider)) {
|
||||||
// if search provider is a list, try to retrieve from localstorage, fall back to the first
|
// if search provider is a list, try to retrieve from localstorage, fall back to the first
|
||||||
searchProvider = getStoredProvider() ?? searchProviders[searchWidget.options.provider[0]];
|
searchProvider = getStoredProvider() ?? searchProviders[searchWidget.options.provider[0]];
|
||||||
} else {
|
} else if (searchWidget.options?.provider === 'custom') {
|
||||||
if (searchWidget.options?.provider === 'custom') {
|
searchProvider = {
|
||||||
searchProvider = {
|
url: searchWidget.options.url
|
||||||
url: searchWidget.options.url
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
searchProvider = searchProviders[searchWidget.options?.provider];
|
|
||||||
}
|
}
|
||||||
|
} else {
|
||||||
|
searchProvider = searchProviders[searchWidget.options?.provider];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user