]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/blobdiff - client/src/app/videos/+video-watch/comment/video-comment-add.component.ts
Fix add comment in threads with deleted comments
[github/Chocobozzz/PeerTube.git] / client / src / app / videos / +video-watch / comment / video-comment-add.component.ts
index a8c432653e3534454003c842661520f5636bb838..0f7c19765c7e1fceb89cc8df8dca1764cc7fdb25 100644 (file)
@@ -57,7 +57,7 @@ export class VideoCommentAddComponent extends FormReactive implements OnInit {
 
       if (this.parentComment) {
         const mentions = this.parentComments
-          .filter(c => c.account.id !== this.user.account.id) // Don't add mention of ourselves
+          .filter(c => c.account && c.account.id !== this.user.account.id) // Don't add mention of ourselves
           .map(c => '@' + c.by)
 
         const mentionsSet = new Set(mentions)
@@ -139,6 +139,7 @@ export class VideoCommentAddComponent extends FormReactive implements OnInit {
 
   cancelCommentReply () {
     this.cancel.emit(null)
+    this.form.value['text'] = this.textareaElement.nativeElement.value = ''
   }
 
   private addCommentReply (commentCreate: VideoCommentCreate) {