From 690bb8f9f3413147a4f71d5ff0a3cd8170a94ce3 Mon Sep 17 00:00:00 2001 From: Chocobozzz Date: Wed, 17 Aug 2022 15:36:03 +0200 Subject: Prefer using Object.values --- client/src/app/shared/shared-video-miniature/video-filters.model.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'client/src/app/shared/shared-video-miniature') diff --git a/client/src/app/shared/shared-video-miniature/video-filters.model.ts b/client/src/app/shared/shared-video-miniature/video-filters.model.ts index 8ad2fcd5d..73a30ca08 100644 --- a/client/src/app/shared/shared-video-miniature/video-filters.model.ts +++ b/client/src/app/shared/shared-video-miniature/video-filters.model.ts @@ -1,4 +1,4 @@ -import { intoArray, toBoolean } from '@app/helpers' +import { splitIntoArray, toBoolean } from '@app/helpers' import { getAllPrivacies } from '@shared/core-utils' import { AttributesOnly } from '@shared/typescript-utils' import { BooleanBothQuery, NSFWPolicyType, VideoInclude, VideoPrivacy, VideoSortField } from '@shared/models' @@ -94,8 +94,8 @@ export class VideoFilters { if (obj.nsfw !== undefined) this.nsfw = obj.nsfw - if (obj.languageOneOf !== undefined) this.languageOneOf = intoArray(obj.languageOneOf) - if (obj.categoryOneOf !== undefined) this.categoryOneOf = intoArray(obj.categoryOneOf) + if (obj.languageOneOf !== undefined) this.languageOneOf = splitIntoArray(obj.languageOneOf) + if (obj.categoryOneOf !== undefined) this.categoryOneOf = splitIntoArray(obj.categoryOneOf) if (obj.scope !== undefined) this.scope = obj.scope if (obj.allVideos !== undefined) this.allVideos = toBoolean(obj.allVideos) -- cgit v1.2.3