Skip to content

Commit

Permalink
fix(validation-messages): fix invalid own property check
Browse files Browse the repository at this point in the history
  • Loading branch information
mateusz-dobrowolski-va committed Apr 15, 2022
1 parent 6bda99a commit f1ae8c4
Showing 1 changed file with 4 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -155,7 +155,10 @@ export class ValidationMessagesComponent implements OnDestroy, DoCheck {
if (this.control && this.control.errors) {
for (const propertyName in this.control.errors) {
if (
Object.prototype.hasOwnProperty.call(this.control, propertyName) &&
Object.prototype.hasOwnProperty.call(
this.control.errors,
propertyName
) &&
propertyName !== "server" &&
!(!this.multiple && this.errorMessages.length === 1)
) {
Expand Down

0 comments on commit f1ae8c4

Please sign in to comment.