Check the comment is defined when validating body

This commit is contained in:
Chocobozzz 2018-10-01 19:07:25 +02:00
parent d05be4d944
commit c049d791f9
No known key found for this signature in database
GPG Key ID: 583A612D890159BE
1 changed files with 1 additions and 1 deletions

View File

@ -9,7 +9,7 @@ function isVideoCommentCreateActivityValid (activity: any) {
}
function sanitizeAndCheckVideoCommentObject (comment: any) {
if (comment.type !== 'Note') return false
if (!comment || comment.type !== 'Note') return false
normalizeComment(comment)