diff --git a/src/lib/i18n/useIntl.tsx b/src/lib/i18n/useIntl.tsx index 5d03293e..abccaf7a 100644 --- a/src/lib/i18n/useIntl.tsx +++ b/src/lib/i18n/useIntl.tsx @@ -8,10 +8,10 @@ import { formatMessage } from "./formatmessage"; This UI library needs to support the following scenarios: - - An application with extensive Internationalization support + - An application with extensive internationalization support (using react-intl). - - An application with basic Internationalization using translated labels + - An application with basic internationalization using translated labels passed as props. - No internalisation (default messages only). @@ -82,7 +82,7 @@ const getLocalizedFallbackIntl = ( // messages not loaded. } const message = - messages[descriptor.id || ""].defaultMessage || + messages[descriptor.id || ""]?.defaultMessage || descriptor.defaultMessage; return formatMessage(message, context); },