diff --git a/packages/zod/src/index.ts b/packages/zod/src/index.ts index 3b55246a3..15b8fd4c0 100644 --- a/packages/zod/src/index.ts +++ b/packages/zod/src/index.ts @@ -229,15 +229,15 @@ export const generateZodValidationSchemaDefinition = ( if (schema.additionalProperties) { functions.push([ 'additionalProperties', - isBoolean(schema.additionalProperties) - ? schema.additionalProperties - : generateZodValidationSchemaDefinition( - schema.additionalProperties as SchemaObject, - context, - true, - name, - strict, - ), + generateZodValidationSchemaDefinition( + isBoolean(schema.additionalProperties) + ? {} + : (schema.additionalProperties as SchemaObject), + context, + true, + name, + strict, + ), ]); break;