Skip to content

Commit

Permalink
Fix coverage (#2395)
Browse files Browse the repository at this point in the history
due to #2392
  • Loading branch information
RobinTail authored Feb 13, 2025
1 parent fef4244 commit ab1b23c
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 6 deletions.
5 changes: 2 additions & 3 deletions express-zod-api/src/deep-checks.ts
Original file line number Diff line number Diff line change
Expand Up @@ -76,9 +76,8 @@ export const hasNestedSchema = (
const handler =
depth < maxDepth
? rules[subject._def[metaSymbol]?.brand as keyof typeof rules] ||
("typeName" in subject._def
? rules[subject._def.typeName as keyof typeof rules]
: undefined)
("typeName" in subject._def &&
rules[subject._def.typeName as keyof typeof rules])
: undefined;
if (handler) {
return handler(subject, {
Expand Down
5 changes: 2 additions & 3 deletions express-zod-api/src/schema-walker.ts
Original file line number Diff line number Diff line change
Expand Up @@ -50,9 +50,8 @@ export const walkSchema = <
): U => {
const handler =
rules[schema._def[metaSymbol]?.brand as keyof typeof rules] ||
("typeName" in schema._def
? rules[schema._def.typeName as keyof typeof rules]
: undefined);
("typeName" in schema._def &&
rules[schema._def.typeName as keyof typeof rules]);
const next = (subject: z.ZodTypeAny) =>
walkSchema(subject, { ctx, onEach, rules, onMissing });
const result = handler
Expand Down
File renamed without changes.

0 comments on commit ab1b23c

Please sign in to comment.