From def2a70b7e5ee807d7b532df8c9d33d17d24ccbb Mon Sep 17 00:00:00 2001 From: Chocobozzz Date: Mon, 23 Dec 2019 13:43:05 +0100 Subject: Fix search SQL query where duplication --- server/models/video/video.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/server/models/video/video.ts b/server/models/video/video.ts index e58146ccf..990c66907 100644 --- a/server/models/video/video.ts +++ b/server/models/video/video.ts @@ -316,7 +316,7 @@ export type AvailableForListIDsOptions = { return query }, [ ScopeNames.AVAILABLE_FOR_LIST_IDS ]: (options: AvailableForListIDsOptions) => { - const whereAnd = options.baseWhere ? options.baseWhere : [] + const whereAnd = options.baseWhere ? [].concat(options.baseWhere) : [] const query: FindOptions = { raw: true, -- cgit v1.2.3