Skip to content

Commit

Permalink
Update ZodMap for new ParseInputLazyPath structure
Browse files Browse the repository at this point in the history
  • Loading branch information
scotttrinh committed Mar 21, 2022
1 parent 3662eb2 commit 2ffcd8d
Showing 1 changed file with 6 additions and 10 deletions.
16 changes: 6 additions & 10 deletions src/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2570,16 +2570,12 @@ export class ZodMap<
const pairs = [...(ctx.data as Map<unknown, unknown>).entries()].map(
([key, value], index) => {
return {
key: keyType._parse({
data: key,
path: [...ctx.path, index, "key"],
parent: ctx,
}),
value: valueType._parse({
data: value,
path: [...ctx.path, index, "value"],
parent: ctx,
}),
key: keyType._parse(
new ParseInputLazyPath(ctx, key, ctx.path, [index, "key"])
),
value: valueType._parse(
new ParseInputLazyPath(ctx, value, ctx.path, [index, "value"])
),
};
}
);
Expand Down

0 comments on commit 2ffcd8d

Please sign in to comment.