diff options
author | Chocobozzz <me@florianbigard.com> | 2018-10-01 19:07:25 +0200 |
---|---|---|
committer | Chocobozzz <me@florianbigard.com> | 2018-10-01 19:07:25 +0200 |
commit | c049d791f92cc10f569ee3122edff616cff381f9 (patch) | |
tree | 9d2ddb56fcdec0f9487fa4a8eef1f37e87f06ac9 /server/helpers | |
parent | d05be4d944e73151cc6cf916c336f63e47feca20 (diff) | |
download | PeerTube-c049d791f92cc10f569ee3122edff616cff381f9.tar.gz PeerTube-c049d791f92cc10f569ee3122edff616cff381f9.tar.zst PeerTube-c049d791f92cc10f569ee3122edff616cff381f9.zip |
Check the comment is defined when validating body
Diffstat (limited to 'server/helpers')
-rw-r--r-- | server/helpers/custom-validators/activitypub/video-comments.ts | 2 |
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 | ||
11 | function sanitizeAndCheckVideoCommentObject (comment: any) { | 11 | function 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 | ||