diff --git a/src/endpoints/search.js b/src/endpoints/search.js index 87152b3d6..e29e53008 100644 --- a/src/endpoints/search.js +++ b/src/endpoints/search.js @@ -188,7 +188,7 @@ router.post('/searxng', jsonParser, async (request, response) => { const searchUrl = new URL('/search', baseUrl); const searchParams = new URLSearchParams(); searchParams.append('q', query); - if (preferences.length > 0) { + if (preferences) { searchParams.append('preferences', preferences); } searchUrl.search = searchParams.toString();