File tree Expand file tree Collapse file tree 1 file changed +10
-2
lines changed Expand file tree Collapse file tree 1 file changed +10
-2
lines changed Original file line number Diff line number Diff line change @@ -38,7 +38,11 @@ export class ExclusiveMinimumHandler implements PrimitiveHandler {
3838 if ( types . number !== false ) {
3939 const currentNumber = types . number || z . number ( ) ;
4040 if ( currentNumber instanceof z . ZodNumber ) {
41- types . number = currentNumber . gt ( numberSchema . exclusiveMinimum ) ;
41+ if ( typeof numberSchema . exclusiveMinimum === "number" ) {
42+ types . number = currentNumber . gt ( numberSchema . exclusiveMinimum ) ;
43+ } else {
44+ types . number = false ;
45+ }
4246 }
4347 }
4448 }
@@ -52,7 +56,11 @@ export class ExclusiveMaximumHandler implements PrimitiveHandler {
5256 if ( types . number !== false ) {
5357 const currentNumber = types . number || z . number ( ) ;
5458 if ( currentNumber instanceof z . ZodNumber ) {
55- types . number = currentNumber . lt ( numberSchema . exclusiveMaximum ) ;
59+ if ( typeof numberSchema . exclusiveMaximum === "number" ) {
60+ types . number = currentNumber . lt ( numberSchema . exclusiveMaximum ) ;
61+ } else {
62+ types . number = false ;
63+ }
5664 }
5765 }
5866 }
You can’t perform that action at this time.
0 commit comments