]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/blobdiff - shared/extra-utils/videos/comments-command.ts
Optimize torrent URL update
[github/Chocobozzz/PeerTube.git] / shared / extra-utils / videos / comments-command.ts
index 5034c57ad5190ca796be87c85b1cbcbd4cdca217..f0d163a0775f4114abe092cd6fb7a3b15e7569e7 100644 (file)
@@ -84,7 +84,7 @@ export class CommentsCommand extends AbstractCommand {
       defaultExpectedStatus: HttpStatusCode.OK_200
     }))
 
-    this.lastThreadId = body.comment.id
+    this.lastThreadId = body.comment?.id
     this.lastVideoId = videoId
 
     return body.comment
@@ -107,7 +107,7 @@ export class CommentsCommand extends AbstractCommand {
       defaultExpectedStatus: HttpStatusCode.OK_200
     }))
 
-    this.lastReplyId = body.comment.id
+    this.lastReplyId = body.comment?.id
 
     return body.comment
   }