diff --git a/packages/oca/src/formatters/credential/LocalizedCredential.ts b/packages/oca/src/formatters/credential/LocalizedCredential.ts index 56a3a85754..34063db748 100644 --- a/packages/oca/src/formatters/credential/LocalizedCredential.ts +++ b/packages/oca/src/formatters/credential/LocalizedCredential.ts @@ -30,11 +30,8 @@ export default class LocalizedCredential { this.attributes = credentialAttributes - ?.filter((attribute) => bundle.getFlaggedAttribute(attribute.name)) - .map((attribute) => { - const overlayOptions = bundle.getAttribute(attribute.name) ?? { name: attribute.name, type: '' } - return new DisplayAttribute(attribute, overlayOptions, language) - }) ?? [] + ?.filter((attribute) => bundle.getAttribute(attribute.name)) + .map((attribute) => new DisplayAttribute(attribute, { name: attribute.name, type: '' }, language)) ?? [] } get primaryAttribute(): DisplayAttribute | undefined { diff --git a/packages/oca/src/formatters/credential/index.ts b/packages/oca/src/formatters/credential/index.ts index ac925a7296..9aff1febf7 100644 --- a/packages/oca/src/formatters/credential/index.ts +++ b/packages/oca/src/formatters/credential/index.ts @@ -1,5 +1,5 @@ -import CredentialFromatter from './CredentialFormatter' +import CredentialFormatter from './CredentialFormatter' import DisplayAttribute from './DisplayAttribute' import LocalizedCredential from './LocalizedCredential' -export { CredentialFromatter, DisplayAttribute, LocalizedCredential } +export { CredentialFormatter, DisplayAttribute, LocalizedCredential }