Skip to content

Commit 50d7222

Browse files
authored
Fix zod skipping directives when generating .min string
1 parent 0bce8ad commit 50d7222

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/zod/index.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -125,7 +125,7 @@ const generateInputObjectFieldTypeZodSchema = (
125125
if (isNonNullType(parentType)) {
126126
if (config.notAllowEmptyString === true) {
127127
const tsType = tsVisitor.scalars[type.name.value];
128-
if (tsType === 'string') return `${gen}.min(1)`;
128+
if (tsType === 'string') return `${appliedDirectivesGen}.min(1)`;
129129
}
130130
return appliedDirectivesGen;
131131
}

0 commit comments

Comments
 (0)