Fix crash when group undefined

Signed-off-by: Thomas Citharel <tcit@tcit.fr>
This commit is contained in:
Thomas Citharel 2021-06-16 14:47:36 +02:00
parent 6c0e503319
commit b884d88ac3
No known key found for this signature in database
GPG Key ID: A061B9DDE0CA0773
2 changed files with 2 additions and 2 deletions

View File

@ -135,7 +135,7 @@ const EVENTS_PAGE_LIMIT = 10;
const { group } = this;
return {
title: this.$t("{group} events", {
group: group.name || usernameWithDomain(group),
group: group?.name || usernameWithDomain(group),
}) as string,
};
},

View File

@ -382,7 +382,7 @@ export default class EditPost extends mixins(GroupMixin) {
}
get actualGroup(): IActor {
if (!this.group.id) {
if (!this.group?.id) {
return this.post.attributedTo as IActor;
}
return this.group;