mirror of
https://github.com/SillyTavern/SillyTavern.git
synced 2024-12-11 17:07:07 +01:00
Improve backward compatibility if preferences
are not passed
This commit is contained in:
parent
f880c68968
commit
61ddb720d7
@ -188,7 +188,7 @@ router.post('/searxng', jsonParser, async (request, response) => {
|
|||||||
const searchUrl = new URL('/search', baseUrl);
|
const searchUrl = new URL('/search', baseUrl);
|
||||||
const searchParams = new URLSearchParams();
|
const searchParams = new URLSearchParams();
|
||||||
searchParams.append('q', query);
|
searchParams.append('q', query);
|
||||||
if (preferences.length > 0) {
|
if (preferences) {
|
||||||
searchParams.append('preferences', preferences);
|
searchParams.append('preferences', preferences);
|
||||||
}
|
}
|
||||||
searchUrl.search = searchParams.toString();
|
searchUrl.search = searchParams.toString();
|
||||||
|
Loading…
Reference in New Issue
Block a user