From 8d4197637868d5cde49434e937186b57e40f4b2b Mon Sep 17 00:00:00 2001 From: Rigel Kent Date: Mon, 4 May 2020 16:13:35 +0200 Subject: Fix video-abuse-list init abuse duplication --- .../+admin/moderation/video-abuse-list/video-abuse-list.component.ts | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'client/src') diff --git a/client/src/app/+admin/moderation/video-abuse-list/video-abuse-list.component.ts b/client/src/app/+admin/moderation/video-abuse-list/video-abuse-list.component.ts index f54e3dccd..39f619cc3 100644 --- a/client/src/app/+admin/moderation/video-abuse-list/video-abuse-list.component.ts +++ b/client/src/app/+admin/moderation/video-abuse-list/video-abuse-list.component.ts @@ -303,7 +303,7 @@ export class VideoAbuseListComponent extends RestTable implements OnInit, AfterV }).subscribe( async resultList => { this.totalRecords = resultList.total - this.videoAbuses = [] + const videoAbuses = [] for (const abuse of resultList.data) { Object.assign(abuse, { @@ -316,9 +316,10 @@ export class VideoAbuseListComponent extends RestTable implements OnInit, AfterV if (abuse.video.channel?.ownerAccount) abuse.video.channel.ownerAccount = new Account(abuse.video.channel.ownerAccount) if (abuse.updatedAt === abuse.createdAt) delete abuse.updatedAt - this.videoAbuses.push(abuse as ProcessedVideoAbuse) + videoAbuses.push(abuse as ProcessedVideoAbuse) } + this.videoAbuses = videoAbuses }, err => this.notifier.error(err.message) -- cgit v1.2.3