mirror of
https://github.com/sudoxnym/habitica.git
synced 2026-04-14 19:56:23 +00:00
* Fixed 'String " not found' bug in categories while saving guild description * syntax changes
This commit is contained in:
parent
c6cf4cfc75
commit
43fc390e28
1 changed files with 4 additions and 5 deletions
|
|
@ -608,22 +608,21 @@ export default {
|
|||
};
|
||||
|
||||
const categoryKeys = this.workingGroup.categories;
|
||||
const serverCategories = [];
|
||||
const categories = [];
|
||||
categoryKeys.forEach(key => {
|
||||
const catName = this.categoriesHashByKey[key];
|
||||
serverCategories.push({
|
||||
categories.push({
|
||||
slug: key,
|
||||
name: catName,
|
||||
});
|
||||
});
|
||||
this.workingGroup.categories = serverCategories;
|
||||
|
||||
const groupData = { ...this.workingGroup };
|
||||
const groupData = { ...this.workingGroup, categories };
|
||||
|
||||
let newgroup;
|
||||
if (groupData.id) {
|
||||
await this.$store.dispatch('guilds:update', { group: groupData });
|
||||
this.$root.$emit('updatedGroup', this.workingGroup);
|
||||
this.$root.$emit('updatedGroup', groupData);
|
||||
// @TODO: this doesn't work because of the async resource
|
||||
// if (updatedGroup.type === 'party') this.$store.state.party = {data: updatedGroup};
|
||||
} else {
|
||||
|
|
|
|||
Loading…
Reference in a new issue