Skip to content

Commit 76535ea

Browse files
pedro2sepiphone
andauthored
Update src/index.ts
Co-authored-by: Aleksi Pekkala <[email protected]>
1 parent 845654e commit 76535ea

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/index.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -73,10 +73,10 @@ export function validationMetadataArrayToSchemas(
7373

7474
const ctMetaForField = ctMetadata?.find((meta: ExposeMetadata) => meta.propertyName == propMeta.propertyName)
7575

76-
if (ctMetaForField) {
77-
propMeta.propertyName = ctMetaForField.options.name ?? propMeta.propertyName
78-
return propMeta
76+
if (ctMetaForField?.options.name) {
77+
propMeta.propertyName = ctMetaForField.options.name;
7978
}
79+
8080
return propMeta
8181
})
8282

0 commit comments

Comments
 (0)