From 6a5563ed5b0f0c2098f4cd9f58fc500113346484 Mon Sep 17 00:00:00 2001 From: Chocobozzz Date: Mon, 15 Jan 2024 11:00:32 +0100 Subject: [PATCH] Fix filters count --- client/src/views/Search.vue | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/client/src/views/Search.vue b/client/src/views/Search.vue index ffe1658..06e09b6 100644 --- a/client/src/views/Search.vue +++ b/client/src/views/Search.vue @@ -131,7 +131,7 @@ import Filters from '../components/Filters.vue' import { searchVideos, searchVideoChannels, searchVideoPlaylists } from '../shared/search' import { getConfig } from '../shared/config' - import { pageToAPIParams, durationRangeToAPIParams, publishedDateRangeToAPIParams, extractTagsFromQuery, extractQueryToIntArray, extractQueryToStringArray, extractQueryToInt, extractQueryToBoolean } from '../shared/utils' + import { pageToAPIParams, durationRangeToAPIParams, publishedDateRangeToAPIParams, extractTagsFromQuery, extractQueryToIntArray, extractQueryToStringArray, extractQueryToInt, extractQueryToBoolean, arrayify } from '../shared/utils' import { SearchUrl } from '../models' import { APIVideo } from '../../../server/types/video.model' import { APIVideoChannel } from '../../../server/types/channel.model' @@ -295,8 +295,8 @@ if (query.languageOneOf) count++ if (query.isLive) count++ if (query.resultType) count++ - if (Array.isArray(query.tagsAllOf) && query.tagsAllOf.length !== 0) count++ - if (Array.isArray(query.tagsOneOf) && query.tagsOneOf.length !== 0) count++ + if (extractQueryToStringArray(query.tagsAllOf) && query.tagsAllOf.length !== 0) count++ + if (extractQueryToStringArray(query.tagsOneOf) && query.tagsOneOf.length !== 0) count++ return count },