We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 98b8a9f commit 490f805Copy full SHA for 490f805
1 file changed
zod-plugin/packer.ts
@@ -25,6 +25,7 @@ export const pack = <T extends z.ZodType, B extends object>(
25
const Cls = z.core.$constructor<$Packer<B>>("$Packer", (inst, def) => {
26
z.core.$ZodCheck.init(inst, def);
27
inst._zod.onattach.push((schema) => {
28
+ if (!schema._zod.bag) schema._zod.bag = {}; // Defensive init
29
Object.assign(schema._zod.bag, def.bag);
30
});
31
inst._zod.check = () => {};
0 commit comments