forked from potsda.mn/mobilizon
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;
|
const { group } = this;
|
||||||
return {
|
return {
|
||||||
title: this.$t("{group} events", {
|
title: this.$t("{group} events", {
|
||||||
group: group.name || usernameWithDomain(group),
|
group: group?.name || usernameWithDomain(group),
|
||||||
}) as string,
|
}) as string,
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
|
|
|
@ -382,7 +382,7 @@ export default class EditPost extends mixins(GroupMixin) {
|
||||||
}
|
}
|
||||||
|
|
||||||
get actualGroup(): IActor {
|
get actualGroup(): IActor {
|
||||||
if (!this.group.id) {
|
if (!this.group?.id) {
|
||||||
return this.post.attributedTo as IActor;
|
return this.post.attributedTo as IActor;
|
||||||
}
|
}
|
||||||
return this.group;
|
return this.group;
|
||||||
|
|
Loading…
Reference in a new issue