X-Git-Url: https://git.immae.eu/?a=blobdiff_plain;f=server%2Fhelpers%2Fcustom-validators%2Factivitypub%2Fvideo-comments.ts;h=051c4565abb0fbbe09107fb01eee837535fe9b21;hb=44b9c0ba31c4a97e3d874f33226ad935c3a90dd5;hp=7a9f7326d1fd473bd6024075047054de87f21c44;hpb=938d3fa0ffb4cf3e4c88f94dcfcae5eb2ce5e190;p=github%2FChocobozzz%2FPeerTube.git 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) { } function sanitizeAndCheckVideoCommentObject (comment: any) { - if (comment.type !== 'Note') return false + if (!comment || comment.type !== 'Note') return false normalizeComment(comment)