From 96f6a845a2db9bb0f4f5d0721f4353805543e90e Mon Sep 17 00:00:00 2001 From: Alicia Sykes Date: Tue, 5 Oct 2021 20:30:02 +0100 Subject: [PATCH] :bug: (#267) Fix custom search engine option --- src/components/Settings/SearchBar.vue | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/components/Settings/SearchBar.vue b/src/components/Settings/SearchBar.vue index 6174f9a7..9a1fa72d 100644 --- a/src/components/Settings/SearchBar.vue +++ b/src/components/Settings/SearchBar.vue @@ -129,7 +129,10 @@ export default { const searchEngine = searchPrefs.searchEngine || defaultSearchEngine; // Use either search bang, or preffered search engine const desiredSearchEngine = searchBang || searchEngine; - let searchUrl = findUrlForSearchEngine(desiredSearchEngine, searchEngineUrls); + const isCustomSearch = (searchPrefs.searchEngine === 'custom' && searchPrefs.customSearchEngine); + let searchUrl = isCustomSearch + ? searchPrefs.customSearchEngine + : findUrlForSearchEngine(desiredSearchEngine, searchEngineUrls); if (searchUrl) { // Append search query to URL, and launch searchUrl += encodeURIComponent(stripBangs(this.input, bangList)); this.launchWebSearch(searchUrl, openingMethod);