#12970 Fixed 'String " not found' bug in categories while saving guild descr… (#12989)

* Fixed 'String " not found' bug in categories while saving guild description

* syntax changes
This commit is contained in:
shantanu96 2021-01-26 04:14:52 +05:30 committed by GitHub
parent c6cf4cfc75
commit 43fc390e28
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

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