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
This commit is contained in:
negue
2018-07-20 05:48:17 +02:00
committed by Keith Holliday
parent 8d9a4e97a8
commit 8b69540e71

View File

@@ -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({