From d0bd8b7d4c55f2bf75ed0ebedab391d2cf82326a Mon Sep 17 00:00:00 2001 From: PrivateGER Date: Fri, 26 May 2023 02:31:10 +0200 Subject: [PATCH] .filter isn't in-place, now reassigning correctly --- packages/backend/src/db/meilisearch.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/backend/src/db/meilisearch.ts b/packages/backend/src/db/meilisearch.ts index 3d2e97692..edd077c03 100644 --- a/packages/backend/src/db/meilisearch.ts +++ b/packages/backend/src/db/meilisearch.ts @@ -59,7 +59,7 @@ export default hasConfig ? { let splitSearch = query.split(" "); // Detect search operators and remove them from the actual query - splitSearch.filter(term => { + splitSearch = splitSearch.filter(term => { if (term.startsWith("has:")) { let fileType = term.slice(4); constructedFilters.push(`mediaAttachment = "${fileType}"`)