Fix event creation

Signed-off-by: Thomas Citharel <tcit@tcit.fr>
This commit is contained in:
Thomas Citharel 2021-03-29 19:26:33 +02:00
parent acf51a3130
commit 69339700cd
No known key found for this signature in database
GPG Key ID: A061B9DDE0CA0773

View File

@ -859,9 +859,12 @@ export default class EditEvent extends Vue {
*/ */
private async buildVariables() { private async buildVariables() {
let res = this.event.toEditJSON(); let res = this.event.toEditJSON();
if (this.event.organizerActor) { const organizerActor = this.event.organizerActor?.id
? this.event.organizerActor
: this.organizerActor;
if (organizerActor) {
res = Object.assign(res, { res = Object.assign(res, {
organizerActorId: this.event.organizerActor.id, organizerActorId: organizerActor.id,
}); });
} }
const attributedToId = this.event.attributedTo?.id const attributedToId = this.event.attributedTo?.id