From 9df52d660feb722404be00a50f3c8a612bec1c15 Mon Sep 17 00:00:00 2001 From: Chocobozzz Date: Tue, 17 Aug 2021 14:42:53 +0200 Subject: Migrate client to eslint --- .../src/app/+videos/+video-edit/shared/video-edit.component.ts | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'client/src/app/+videos/+video-edit/shared/video-edit.component.ts') diff --git a/client/src/app/+videos/+video-edit/shared/video-edit.component.ts b/client/src/app/+videos/+video-edit/shared/video-edit.component.ts index 90a0e8f52..366c93a79 100644 --- a/client/src/app/+videos/+video-edit/shared/video-edit.component.ts +++ b/client/src/app/+videos/+video-edit/shared/video-edit.component.ts @@ -233,7 +233,7 @@ export class VideoEditComponent implements OnInit, OnDestroy { async deleteCaption (caption: VideoCaptionEdit) { // Caption recovers his former state - if (caption.action && this.initialVideoCaptions.indexOf(caption.language.id) !== -1) { + if (caption.action && this.initialVideoCaptions.includes(caption.language.id)) { caption.action = undefined return } @@ -297,7 +297,7 @@ export class VideoEditComponent implements OnInit, OnDestroy { private trackPrivacyChange () { // We will update the schedule input and the wait transcoding checkbox validators - this.form.controls[ 'privacy' ] + this.form.controls['privacy'] .valueChanges .pipe(map(res => parseInt(res.toString(), 10))) .subscribe( @@ -336,12 +336,12 @@ export class VideoEditComponent implements OnInit, OnDestroy { private trackChannelChange () { // We will update the "support" field depending on the channel - this.form.controls[ 'channelId' ] + this.form.controls['channelId'] .valueChanges .pipe(map(res => parseInt(res.toString(), 10))) .subscribe( newChannelId => { - const oldChannelId = parseInt(this.form.value[ 'channelId' ], 10) + const oldChannelId = parseInt(this.form.value['channelId'], 10) // Not initialized yet if (isNaN(newChannelId)) return @@ -350,7 +350,7 @@ export class VideoEditComponent implements OnInit, OnDestroy { // Wait support field update setTimeout(() => { - const currentSupport = this.form.value[ 'support' ] + const currentSupport = this.form.value['support'] // First time we set the channel? if (isNaN(oldChannelId)) { -- cgit v1.2.3