diff --git a/src/components/modules/violations/ViolationDetails.js b/src/components/modules/violations/ViolationDetails.js index b9adb7b..c48f38c 100644 --- a/src/components/modules/violations/ViolationDetails.js +++ b/src/components/modules/violations/ViolationDetails.js @@ -399,9 +399,9 @@ export default (props) => { Имена - {data.author.firstName - ? `${data.author.firstName} ${data.author.lastName}` - : data.author.name} + {data?.author?.firstName + ? `${data?.author?.firstName} ${data?.author?.lastName}` + : data?.author?.name} {data.author?.organization && ( diff --git a/src/components/modules/violations/ViolationList.js b/src/components/modules/violations/ViolationList.js index bf5a98e..6070816 100644 --- a/src/components/modules/violations/ViolationList.js +++ b/src/components/modules/violations/ViolationList.js @@ -293,9 +293,9 @@ export default (props) => { {violation.town.name} - {violation.author.firstName + {violation?.author?.firstName ? `${violation.author.firstName} ${violation.author.lastName}` - : violation.author.name} + : violation?.author?.name} {violation.description.slice(0, 40) + '...'}