]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/blobdiff - server/lib/activitypub/share.ts
Fix server lint
[github/Chocobozzz/PeerTube.git] / server / lib / activitypub / share.ts
index 0fefcbbc560fdfafb0febaa0d611ae9365803bc8..af0dd510a97bf4179e1b11e04245e7f37c948d28 100644 (file)
@@ -57,7 +57,7 @@ export {
 
 async function addVideoShare (shareUrl: string, video: MVideoId) {
   const { body } = await doJSONRequest<any>(shareUrl, { activityPub: true })
-  if (!body || !body.actor) throw new Error('Body or body actor is invalid')
+  if (!body?.actor) throw new Error('Body or body actor is invalid')
 
   const actorUrl = getAPId(body.actor)
   if (checkUrlsSameHost(shareUrl, actorUrl) !== true) {