Fix abuse crash on deleted video
This commit is contained in:
parent
88cfa3e8fa
commit
494df94036
|
@ -434,10 +434,10 @@ export class AbuseModel extends Model {
|
|||
}
|
||||
|
||||
buildBaseVideoCommentAbuse (this: MAbuseUserFormattable) {
|
||||
if (!this.VideoCommentAbuse) return null
|
||||
// Associated video comment could have been destroyed if the video has been deleted
|
||||
if (!this.VideoCommentAbuse || !this.VideoCommentAbuse.VideoComment) return null
|
||||
|
||||
const abuseModel = this.VideoCommentAbuse
|
||||
const entity = abuseModel.VideoComment
|
||||
const entity = this.VideoCommentAbuse.VideoComment
|
||||
|
||||
return {
|
||||
id: entity.id,
|
||||
|
|
Loading…
Reference in New Issue