Fix crash when group undefined
Signed-off-by: Thomas Citharel <tcit@tcit.fr>
This commit is contained in:
parent
6c0e503319
commit
b884d88ac3
|
@ -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,
|
||||
};
|
||||
},
|
||||
|
|
|
@ -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;
|
||||
|
|
Loading…
Reference in a new issue