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

Signed-off-by: Abhishek Paul <paul.apaul.abhishek.ap@gmail.com>
This commit is contained in:
abhip2565
2025-10-16 12:17:40 +05:30
committed by GitHub
parent 97901da7d3
commit 50ffc6aace

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';