diff --git a/src/resources/destinations.tsx b/src/resources/destinations.tsx index 8a249a1..8737e46 100644 --- a/src/resources/destinations.tsx +++ b/src/resources/destinations.tsx @@ -87,7 +87,7 @@ const DestinationTitle = () => { const translate = useTranslate(); return ( - {translate("resources.destinations.name", 1)} {record.destination} + {translate("resources.destinations.name", 1)} {record?.destination} ); }; diff --git a/src/resources/rooms.tsx b/src/resources/rooms.tsx index 6da77db..9e974af 100644 --- a/src/resources/rooms.tsx +++ b/src/resources/rooms.tsx @@ -65,7 +65,7 @@ const RoomTitle = () => { const RoomShowActions = () => { const record = useRecordContext(); - const publishButton = record.public ? : ; + const publishButton = record?.public ? : ; // FIXME: refresh after (un)publish return ( diff --git a/src/resources/users.tsx b/src/resources/users.tsx index 7544ee2..10cf9b9 100644 --- a/src/resources/users.tsx +++ b/src/resources/users.tsx @@ -140,7 +140,7 @@ const UserEditActions = () => { return ( - {!record.deactivated && } + {!record?.deactivated && }