Fix console error when rewriting a comment

pull/4176/head
Chocobozzz 2021-06-08 10:40:38 +02:00
parent 2f6a237f30
commit 5982ffc4b5
No known key found for this signature in database
GPG Key ID: 583A612D890159BE
1 changed files with 3 additions and 0 deletions

View File

@ -88,6 +88,9 @@ export class VideoCommentAddComponent extends FormReactive implements OnChanges,
} }
ngOnChanges (changes: SimpleChanges) { ngOnChanges (changes: SimpleChanges) {
// Not initialized yet
if (!this.form) return
if (changes.textValue && changes.textValue.currentValue && changes.textValue.currentValue !== changes.textValue.previousValue) { if (changes.textValue && changes.textValue.currentValue && changes.textValue.currentValue !== changes.textValue.previousValue) {
this.patchTextValue(changes.textValue.currentValue, true) this.patchTextValue(changes.textValue.currentValue, true)
} }