diff options
author | Chocobozzz <me@florianbigard.com> | 2021-06-08 10:40:38 +0200 |
---|---|---|
committer | Chocobozzz <me@florianbigard.com> | 2021-06-08 10:40:38 +0200 |
commit | 5982ffc4b5c926ea51f5bb3ca48f0f2f8f5bd621 (patch) | |
tree | b588c6ae5c9eb1bfef2e20edccc908e16e53c3dc /client/src | |
parent | 2f6a237f307e6df166def6685741126e35903a35 (diff) | |
download | PeerTube-5982ffc4b5c926ea51f5bb3ca48f0f2f8f5bd621.tar.gz PeerTube-5982ffc4b5c926ea51f5bb3ca48f0f2f8f5bd621.tar.zst PeerTube-5982ffc4b5c926ea51f5bb3ca48f0f2f8f5bd621.zip |
Fix console error when rewriting a comment
Diffstat (limited to 'client/src')
-rw-r--r-- | client/src/app/+videos/+video-watch/comment/video-comment-add.component.ts | 3 |
1 files changed, 3 insertions, 0 deletions
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, | |||
88 | } | 88 | } |
89 | 89 | ||
90 | ngOnChanges (changes: SimpleChanges) { | 90 | ngOnChanges (changes: SimpleChanges) { |
91 | // Not initialized yet | ||
92 | if (!this.form) return | ||
93 | |||
91 | if (changes.textValue && changes.textValue.currentValue && changes.textValue.currentValue !== changes.textValue.previousValue) { | 94 | if (changes.textValue && changes.textValue.currentValue && changes.textValue.currentValue !== changes.textValue.previousValue) { |
92 | this.patchTextValue(changes.textValue.currentValue, true) | 95 | this.patchTextValue(changes.textValue.currentValue, true) |
93 | } | 96 | } |