Fix a few undefined records (#580)

pull/587/head
rkfg 2 months ago committed by GitHub
parent eb626a7e9e
commit 77cc936710
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

@ -87,7 +87,7 @@ const DestinationTitle = () => {
const translate = useTranslate();
return (
<span>
{translate("resources.destinations.name", 1)} {record.destination}
{translate("resources.destinations.name", 1)} {record?.destination}
</span>
);
};

@ -65,7 +65,7 @@ const RoomTitle = () => {
const RoomShowActions = () => {
const record = useRecordContext();
const publishButton = record.public ? <RoomDirectoryUnpublishButton /> : <RoomDirectoryPublishButton />;
const publishButton = record?.public ? <RoomDirectoryUnpublishButton /> : <RoomDirectoryPublishButton />;
// FIXME: refresh after (un)publish
return (
<TopToolbar>

@ -140,7 +140,7 @@ const UserEditActions = () => {
return (
<TopToolbar>
{!record.deactivated && <ServerNoticeButton />}
{!record?.deactivated && <ServerNoticeButton />}
<DeleteButton
label="resources.users.action.erase"
confirmTitle={translate("resources.users.helper.erase", {

Loading…
Cancel
Save