Skip to content

Commit

Permalink
fix(NumberInterface): validation not working if min or max set to 0 (#…
Browse files Browse the repository at this point in the history
  • Loading branch information
newcat committed Jan 13, 2024
1 parent 316b310 commit dea56ba
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ export class BaseNumericInterface extends NodeInterface<number> implements IVali
}

public validate(v: number) {
return (!this.min || v >= this.min) && (!this.max || v <= this.max);
return (this.min === undefined || v >= this.min) && (this.max === undefined || v <= this.max);
}
}

Expand Down

0 comments on commit dea56ba

Please sign in to comment.