aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorChocobozzz <me@florianbigard.com>2018-10-01 19:07:25 +0200
committerChocobozzz <me@florianbigard.com>2018-10-01 19:07:25 +0200
commitc049d791f92cc10f569ee3122edff616cff381f9 (patch)
tree9d2ddb56fcdec0f9487fa4a8eef1f37e87f06ac9
parentd05be4d944e73151cc6cf916c336f63e47feca20 (diff)
downloadPeerTube-c049d791f92cc10f569ee3122edff616cff381f9.tar.gz
PeerTube-c049d791f92cc10f569ee3122edff616cff381f9.tar.zst
PeerTube-c049d791f92cc10f569ee3122edff616cff381f9.zip
Check the comment is defined when validating body
-rw-r--r--server/helpers/custom-validators/activitypub/video-comments.ts2
1 files changed, 1 insertions, 1 deletions
diff --git a/server/helpers/custom-validators/activitypub/video-comments.ts b/server/helpers/custom-validators/activitypub/video-comments.ts
index 7a9f7326d..051c4565a 100644
--- a/server/helpers/custom-validators/activitypub/video-comments.ts
+++ b/server/helpers/custom-validators/activitypub/video-comments.ts
@@ -9,7 +9,7 @@ function isVideoCommentCreateActivityValid (activity: any) {
9} 9}
10 10
11function sanitizeAndCheckVideoCommentObject (comment: any) { 11function sanitizeAndCheckVideoCommentObject (comment: any) {
12 if (comment.type !== 'Note') return false 12 if (!comment || comment.type !== 'Note') return false
13 13
14 normalizeComment(comment) 14 normalizeComment(comment)
15 15