Fix video-abuse-list init abuse duplication

pull/2737/head
Rigel Kent 2020-05-04 16:13:35 +02:00
parent 25a42e293b
commit 8d41976378
No known key found for this signature in database
GPG Key ID: 5E53E96A494E452F
1 changed files with 3 additions and 2 deletions

View File

@ -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)