]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/blobdiff - server/helpers/custom-validators/activitypub/videos.ts
Add ability to import video with youtube-dl
[github/Chocobozzz/PeerTube.git] / server / helpers / custom-validators / activitypub / videos.ts
index d97bbd2a94636e6560593dfa2ec83a1c979712b8..c6a3502367fc526a2d8ceae5ca81e8a56968df52 100644 (file)
@@ -45,7 +45,7 @@ function isActivityPubVideoDurationValid (value: string) {
 }
 
 function sanitizeAndCheckVideoTorrentObject (video: any) {
-  if (video.type !== 'Video') return false
+  if (!video || video.type !== 'Video') return false
 
   if (!setValidRemoteTags(video)) return false
   if (!setValidRemoteVideoUrls(video)) return false