diff --git a/webapp/src/component/activity/activityTools.tsx b/webapp/src/component/activity/activityTools.tsx index e3b75134bf..e827abad85 100644 --- a/webapp/src/component/activity/activityTools.tsx +++ b/webapp/src/component/activity/activityTools.tsx @@ -113,7 +113,7 @@ function getFieldLanguageTag( entityData: ModifiedEntityModel ): string | undefined { if (entityType == 'Translation') { - return entityData.relations?.['language'].data?.['tag'] as any as string; + return entityData.relations?.['language']?.data?.['tag'] as any as string; } } diff --git a/webapp/src/views/projects/translations/context/services/useEditService.tsx b/webapp/src/views/projects/translations/context/services/useEditService.tsx index f5ca5bb668..048abf2d17 100644 --- a/webapp/src/views/projects/translations/context/services/useEditService.tsx +++ b/webapp/src/views/projects/translations/context/services/useEditService.tsx @@ -205,7 +205,7 @@ export const useEditService = ({ translations, viewRefs }: Props) => { translations.selectedLanguages ); - if (result) { + if (result?.translations) { Object.entries(result.translations).forEach(([lang, translation]) => translations.changeTranslations([ { keyId, language: lang, value: translation },