[INJIMOB-3591] fix fallback if wellknown outer display property missing (#2103)

Signed-off-by: Abhishek Paul <paul.apaul.abhishek.ap@gmail.com>
This commit is contained in:
abhip2565
2025-10-15 06:25:06 +05:30
committed by GitHub
parent 5413671e8e
commit c748eff99b

View File

@@ -91,7 +91,7 @@ export const updateCredentialInformation = async (
credentialConfigurationId: context.selectedCredentialType.id,
issuerLogo: getDisplayObjectForCurrentLanguage(
context.selectedIssuer.display,
)?.logo,
)?.logo ?? "",
processedCredential,
};
} catch (e) {
@@ -113,9 +113,12 @@ export const updateCredentialInformation = async (
};
export const getDisplayObjectForCurrentLanguage = (
display: [displayType],
display: displayType[],
): displayType => {
const currentLanguage = i18next.language;
if (!display || display.length === 0) {
return {} as displayType;
}
const languageKey = Object.keys(display[0]).includes('language')
? 'language'
: 'locale';