mirror of
https://github.com/HabitRPG/habitica.git
synced 2025-12-17 22:57:21 +01:00
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:
@@ -317,14 +317,17 @@ export default {
|
|||||||
methods: {
|
methods: {
|
||||||
async shown () {
|
async shown () {
|
||||||
this.groups = await this.$store.dispatch('guilds:getMyGuilds');
|
this.groups = await this.$store.dispatch('guilds:getMyGuilds');
|
||||||
await this.$store.dispatch('party:getParty');
|
|
||||||
const party = this.$store.state.party.data;
|
if (this.user.party && this.user.party._id) {
|
||||||
if (party._id) {
|
await this.$store.dispatch('party:getParty');
|
||||||
this.groups.push({
|
const party = this.$store.state.party.data;
|
||||||
name: party.name,
|
if (party._id) {
|
||||||
_id: party._id,
|
this.groups.push({
|
||||||
privacy: 'private',
|
name: party.name,
|
||||||
});
|
_id: party._id,
|
||||||
|
privacy: 'private',
|
||||||
|
});
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
this.groups.push({
|
this.groups.push({
|
||||||
|
|||||||
Reference in New Issue
Block a user