Skip to content

Commit 2bed4b3

Browse files
committed
4.1.11
1 parent 82cd717 commit 2bed4b3

File tree

6 files changed

+6
-6
lines changed

6 files changed

+6
-6
lines changed

packages/zod/jsr.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@zod/zod",
3-
"version": "4.1.10",
3+
"version": "4.1.11",
44
"exports": {
55
"./package.json": "./package.json",
66
".": "./src/index.ts",

packages/zod/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "zod",
3-
"version": "4.1.10",
3+
"version": "4.1.11",
44
"type": "module",
55
"license": "MIT",
66
"author": "Colin McDonnell <zod@colinhacks.com>",

packages/zod/src/v4/classic/schemas.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1224,7 +1224,7 @@ export function object<T extends core.$ZodLooseShape = Partial<Record<never, cor
12241224
): ZodObject<util.Writeable<T>, core.$strip> {
12251225
const def: core.$ZodObjectDef = {
12261226
type: "object",
1227-
shape: shape!,
1227+
shape: shape ?? {},
12281228
...util.normalizeParams(params),
12291229
};
12301230
return new ZodObject(def) as any;

packages/zod/src/v4/core/schemas.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1827,7 +1827,7 @@ export const $ZodObject: core.$constructor<$ZodObject> = /*@__PURE__*/ core.$con
18271827
$ZodType.init(inst, def);
18281828
// const sh = def.shape;
18291829
const desc = Object.getOwnPropertyDescriptor(def, "shape");
1830-
if (!desc!.get) {
1830+
if (!desc?.get) {
18311831
const sh = def.shape;
18321832
Object.defineProperty(def, "shape", {
18331833
get: () => {
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
export const version = {
22
major: 4,
33
minor: 1,
4-
patch: 10 as number,
4+
patch: 11 as number,
55
} as const;

packages/zod/src/v4/mini/schemas.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -769,7 +769,7 @@ export function object<T extends core.$ZodLooseShape = Record<never, SomeType>>(
769769
): ZodMiniObject<T, core.$strip> {
770770
const def: core.$ZodObjectDef = {
771771
type: "object",
772-
shape: shape!,
772+
shape: shape ?? {},
773773
...util.normalizeParams(params),
774774
};
775775
return new ZodMiniObject(def) as any;

0 commit comments

Comments
 (0)