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

Commit 66f2f4c

Browse files
fix: 🐛 missed null check for showMaxErrors
1 parent 8c05502 commit 66f2f4c

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

projects/ngx-errors/src/lib/errors-configuration.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ export interface IErrorsConfiguration {
2424
*
2525
* `'formIsSubmitted'` - shows an error when parent form was submitted.
2626
*/
27-
showErrorsWhenInput: string;
27+
showErrorsWhenInput?: string;
2828

2929
/**
3030
* The maximum amount of errors to display per ngxErrors block.

projects/ngx-errors/src/lib/errors.directive.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,7 @@ export class ErrorsDirective implements AfterViewInit {
9393

9494
const visible =
9595
!errorCouldBeHidden &&
96-
(!this.config.showMaxErrors ||
96+
(!this.config?.showMaxErrors ||
9797
visibleCount <= this.config.showMaxErrors);
9898

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

0 commit comments

Comments
 (0)