From 5982ffc4b5c926ea51f5bb3ca48f0f2f8f5bd621 Mon Sep 17 00:00:00 2001 From: Chocobozzz Date: Tue, 8 Jun 2021 10:40:38 +0200 Subject: [PATCH] Fix console error when rewriting a comment --- .../+video-watch/comment/video-comment-add.component.ts | 3 +++ 1 file changed, 3 insertions(+) diff --git a/client/src/app/+videos/+video-watch/comment/video-comment-add.component.ts b/client/src/app/+videos/+video-watch/comment/video-comment-add.component.ts index c926d8d70..78efe1684 100644 --- a/client/src/app/+videos/+video-watch/comment/video-comment-add.component.ts +++ b/client/src/app/+videos/+video-watch/comment/video-comment-add.component.ts @@ -88,6 +88,9 @@ export class VideoCommentAddComponent extends FormReactive implements OnChanges, } ngOnChanges (changes: SimpleChanges) { + // Not initialized yet + if (!this.form) return + if (changes.textValue && changes.textValue.currentValue && changes.textValue.currentValue !== changes.textValue.previousValue) { this.patchTextValue(changes.textValue.currentValue, true) }