File tree Expand file tree Collapse file tree 1 file changed +2
-2
lines changed
projects/xtream/ngx-validation-errors/src/lib Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -49,7 +49,7 @@ export class FormFieldEmptyContainerDirective implements DoCheck {
4949 const hasError = ( ! this . formControl . valid && this . formControl . touched ) && ! this . validationDisabled ;
5050 let messages ;
5151 if ( hasError ) {
52- messages = Object . keys ( this . formControl . errors ) . map ( error => {
52+ messages = Object . keys ( this . formControl . errors || { } ) . map ( error => {
5353 const fieldName = this . formControlName ;
5454 const errorKey = `${ toScreamingSnakeCase ( fieldName ) } .ERRORS.${ toScreamingSnakeCase ( error ) } ` ;
5555 if ( this . messageProvider &&
@@ -59,7 +59,7 @@ export class FormFieldEmptyContainerDirective implements DoCheck {
5959 return `${ this . validationContext } .${ errorKey } ` ;
6060 }
6161 } ) ;
62- const params = Object . values ( this . formControl . errors ) . reduce ( ( a , b ) => {
62+ const params = Object . values ( this . formControl . errors || { } ) . reduce ( ( a , b ) => {
6363 a = { ...a , ...b } ;
6464 return a ;
6565 } , { } ) ;
You can’t perform that action at this time.
0 commit comments