diff --git a/src/pages/index.jsx b/src/pages/index.jsx index 6c42ab716..152f28f19 100644 --- a/src/pages/index.jsx +++ b/src/pages/index.jsx @@ -200,14 +200,12 @@ function Home({ initialSettings }) { if (Array.isArray(searchWidget.options?.provider)) { // if search provider is a list, try to retrieve from localstorage, fall back to the first searchProvider = getStoredProvider() ?? searchProviders[searchWidget.options.provider[0]]; - } else { - if (searchWidget.options?.provider === 'custom') { - searchProvider = { - url: searchWidget.options.url - } - } else { - searchProvider = searchProviders[searchWidget.options?.provider]; + } else if (searchWidget.options?.provider === 'custom') { + searchProvider = { + url: searchWidget.options.url } + } else { + searchProvider = searchProviders[searchWidget.options?.provider]; } }