From 8b69540e71261efa7b317cbe0f17294f5b57a30b Mon Sep 17 00:00:00 2001 From: negue Date: Fri, 20 Jul 2018 05:48:17 +0200 Subject: [PATCH] FIX: Challenge Creation without Group not found error (#10525) * prevent loading the party, if the user isn't part of one * check for the party id too --- .../components/challenges/challengeModal.vue | 19 +++++++++++-------- 1 file changed, 11 insertions(+), 8 deletions(-) diff --git a/website/client/components/challenges/challengeModal.vue b/website/client/components/challenges/challengeModal.vue index 0b4637505b..84e328a8c6 100644 --- a/website/client/components/challenges/challengeModal.vue +++ b/website/client/components/challenges/challengeModal.vue @@ -317,14 +317,17 @@ export default { methods: { async shown () { this.groups = await this.$store.dispatch('guilds:getMyGuilds'); - await this.$store.dispatch('party:getParty'); - const party = this.$store.state.party.data; - if (party._id) { - this.groups.push({ - name: party.name, - _id: party._id, - privacy: 'private', - }); + + if (this.user.party && this.user.party._id) { + await this.$store.dispatch('party:getParty'); + const party = this.$store.state.party.data; + if (party._id) { + this.groups.push({ + name: party.name, + _id: party._id, + privacy: 'private', + }); + } } this.groups.push({