Skip to content
This repository has been archived by the owner on May 3, 2024. It is now read-only.

Commit

Permalink
fix: 馃悰 missed null check for showMaxErrors
Browse files Browse the repository at this point in the history
  • Loading branch information
DmitryEfimenko committed Jan 11, 2022
1 parent 8c05502 commit 66f2f4c
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion projects/ngx-errors/src/lib/errors-configuration.ts
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ export interface IErrorsConfiguration {
*
* `'formIsSubmitted'` - shows an error when parent form was submitted.
*/
showErrorsWhenInput: string;
showErrorsWhenInput?: string;

/**
* The maximum amount of errors to display per ngxErrors block.
Expand Down
2 changes: 1 addition & 1 deletion projects/ngx-errors/src/lib/errors.directive.ts
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ export class ErrorsDirective implements AfterViewInit {

const visible =
!errorCouldBeHidden &&
(!this.config.showMaxErrors ||
(!this.config?.showMaxErrors ||
visibleCount <= this.config.showMaxErrors);

arr.push({ key, hidden: !visible });
Expand Down

0 comments on commit 66f2f4c

Please sign in to comment.