Avoid giving an error page if the apollo futureParticipations query is

undefined

Closes #932

Signed-off-by: Thomas Citharel <tcit@tcit.fr>
This commit is contained in:
Thomas Citharel 2021-11-22 10:08:12 +01:00
parent 83783ad34b
commit 506a6dd4c7
No known key found for this signature in database
GPG key ID: A061B9DDE0CA0773

View file

@ -434,24 +434,28 @@ export default class MyEvents extends Vue {
loadMoreFutureParticipations(): void {
this.futurePage += 1;
this.$apollo.queries.futureParticipations.fetchMore({
// New variables
variables: {
page: this.futurePage,
limit: this.limit,
},
});
if (this.$apollo.queries.futureParticipations) {
this.$apollo.queries.futureParticipations.fetchMore({
// New variables
variables: {
page: this.futurePage,
limit: this.limit,
},
});
}
}
loadMorePastParticipations(): void {
this.pastPage += 1;
this.$apollo.queries.pastParticipations.fetchMore({
// New variables
variables: {
page: this.pastPage,
limit: this.limit,
},
});
if (this.$apollo.queries.pastParticipations) {
this.$apollo.queries.pastParticipations.fetchMore({
// New variables
variables: {
page: this.pastPage,
limit: this.limit,
},
});
}
}
eventDeleted(eventid: string): void {