Browse Source

fix "maximum call stack size exceeded" error with rich text editor

pull/357/head
alwinnen@gmail.com 7 years ago
parent
commit
49dbd6f7af
  1. 12
      src/Squidex/app/framework/angular/forms/control-errors.component.ts

12
src/Squidex/app/framework/angular/forms/control-errors.component.ts

@ -60,10 +60,7 @@ export class ControlErrorsComponent extends StatefulComponent<State> implements
public ngOnDestroy() {
super.ngOnDestroy();
if (this.control && this.originalMarkAsTouched) {
this.control['markAsTouched'] = this.originalMarkAsTouched;
}
this.restoreOriginalMarkAsTouchedFunction();
}
public ngOnChanges() {
@ -87,6 +84,7 @@ export class ControlErrorsComponent extends StatefulComponent<State> implements
if (this.control !== control) {
this.unsubscribeAll();
this.restoreOriginalMarkAsTouchedFunction();
this.control = control;
@ -112,6 +110,12 @@ export class ControlErrorsComponent extends StatefulComponent<State> implements
this.createMessages();
}
private restoreOriginalMarkAsTouchedFunction() {
if (this.control && this.originalMarkAsTouched) {
this.control['markAsTouched'] = this.originalMarkAsTouched;
}
}
private createMessages() {
const errors: string[] = [];

Loading…
Cancel
Save