From 046f2986a8da3c28a496611719eb611c3e2ecec8 Mon Sep 17 00:00:00 2001 From: shamoon <4887959+shamoon@users.noreply.github.com> Date: Tue, 31 Jan 2023 00:58:29 -0800 Subject: [PATCH] lint support custom search provider in quicklaunch --- src/pages/index.jsx | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) 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]; } }