1
0
Fork 0

Fix console error when rewriting a comment

This commit is contained in:
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

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)
} }