Skip to content

Commit

Permalink
fix: Merge provided schema with the extended one
Browse files Browse the repository at this point in the history
Signed-off-by: Tom Lanser <[email protected]>
  • Loading branch information
Tommylans committed Nov 11, 2024
1 parent 1fc95dc commit 04a2ef6
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions packages/core/src/metadata/entity/utils/createEntity.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,12 @@ import { metadataPolicySchema } from '../../policy'

export const createEntity = <T extends string, S extends z.ZodRawShape>({
identifier,
additionalValidation,
additionalValidation = {} as S,
}: {
identifier: T
additionalValidation?: S
}) => {
const schema = commonMetadataSchema.extend(additionalValidation ?? {})
const schema = commonMetadataSchema.extend(additionalValidation)
return {
identifier,
schema,
Expand Down

0 comments on commit 04a2ef6

Please sign in to comment.