From 98a92bb9d5b55166905d11b096a5e9da0d4f03b5 Mon Sep 17 00:00:00 2001 From: Sebastian Date: Sat, 4 May 2019 15:55:34 +0200 Subject: [PATCH] Fix for PR. --- .../angular/forms/control-errors.component.ts | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/src/Squidex/app/framework/angular/forms/control-errors.component.ts b/src/Squidex/app/framework/angular/forms/control-errors.component.ts index d58093df1..a481fcdee 100644 --- a/src/Squidex/app/framework/angular/forms/control-errors.component.ts +++ b/src/Squidex/app/framework/angular/forms/control-errors.component.ts @@ -60,7 +60,8 @@ export class ControlErrorsComponent extends StatefulComponent implements public ngOnDestroy() { super.ngOnDestroy(); - this.restoreOriginalMarkAsTouchedFunction(); + + this.unsetCustomMarkAsTouchedFunction(); } public ngOnChanges() { @@ -84,7 +85,7 @@ export class ControlErrorsComponent extends StatefulComponent implements if (this.control !== control) { this.unsubscribeAll(); - this.restoreOriginalMarkAsTouchedFunction(); + this.unsetCustomMarkAsTouchedFunction(); this.control = control; @@ -110,10 +111,10 @@ export class ControlErrorsComponent extends StatefulComponent implements this.createMessages(); } - private restoreOriginalMarkAsTouchedFunction() { - if (this.control && this.originalMarkAsTouched) { - this.control['markAsTouched'] = this.originalMarkAsTouched; - } + private unsetCustomMarkAsTouchedFunction() { + if (this.control && this.originalMarkAsTouched) { + this.control['markAsTouched'] = this.originalMarkAsTouched; + } } private createMessages() {