Skip to content

Commit

Permalink
fix(core): fix TypeError caused by validation of duplicate field names
Browse files Browse the repository at this point in the history
Closes #5163
  • Loading branch information
B4nan committed Jan 23, 2024
1 parent 5dd11e9 commit 01d8c26
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/core/src/metadata/MetadataValidator.ts
Expand Up @@ -222,7 +222,7 @@ export class MetadataValidator {
if (duplicates.length > 0 && options.checkDuplicateFieldNames) {
const pairs = duplicates.flatMap(name => {
return Object.values(meta.properties)
.filter(p => p.fieldNames[0] === name)
.filter(p => p.fieldNames?.[0] === name)
.map(prop => {
return [prop.embedded ? prop.embedded.join('.') : prop.name, prop.fieldNames[0]] as [string, string];
});
Expand Down

0 comments on commit 01d8c26

Please sign in to comment.