From 54909304287f3c04dcfb39660be8ead57dc95440 Mon Sep 17 00:00:00 2001 From: Chocobozzz Date: Wed, 24 May 2023 16:48:54 +0200 Subject: Remove suppressImplicitAnyIndexErrors It's deprecated by TS --- client/src/app/shared/shared-main/video/video-edit.model.ts | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'client/src/app/shared/shared-main/video') diff --git a/client/src/app/shared/shared-main/video/video-edit.model.ts b/client/src/app/shared/shared-main/video/video-edit.model.ts index 91d57cb6b..47eee80d8 100644 --- a/client/src/app/shared/shared-main/video/video-edit.model.ts +++ b/client/src/app/shared/shared-main/video/video-edit.model.ts @@ -1,6 +1,7 @@ import { getAbsoluteAPIUrl } from '@app/helpers' import { VideoPrivacy, VideoScheduleUpdate, VideoUpdate } from '@shared/models' import { VideoDetails } from './video-details.model' +import { objectKeysTyped } from '@shared/core-utils' export class VideoEdit implements VideoUpdate { static readonly SPECIAL_SCHEDULED_PRIVACY = -1 @@ -65,8 +66,9 @@ export class VideoEdit implements VideoUpdate { } patch (values: { [ id: string ]: any }) { - Object.keys(values).forEach((key) => { - this[key] = values[key] + objectKeysTyped(values).forEach(key => { + // FIXME: typings + (this as any)[key] = values[key] }) // If schedule publication, the video is private and will be changed to public privacy -- cgit v1.2.3