Skip to content

Commit

Permalink
fix(amazon): do not set target group errors to falsy values (#7050)
Browse files Browse the repository at this point in the history
  • Loading branch information
anotherchrisberry committed May 22, 2019
1 parent d794173 commit e259625
Showing 1 changed file with 4 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -47,9 +47,12 @@ export class TargetGroups extends React.Component<ITargetGroupsProps, ITargetGro
private checkBetween(errors: any, object: any, fieldName: string, min: number, max: number) {
const field = object[fieldName];
if (!Number.isNaN(field)) {
errors[fieldName] =
const error =
Validators.minValue(min)(field, robotToHuman(fieldName)) ||
Validators.maxValue(max)(field, robotToHuman(fieldName));
if (error) {
errors[fieldName] = error;
}
}
}

Expand Down

0 comments on commit e259625

Please sign in to comment.