From 43fc390e28465bce68bc014a5264259a5cc44217 Mon Sep 17 00:00:00 2001 From: shantanu96 Date: Tue, 26 Jan 2021 04:14:52 +0530 Subject: [PATCH] =?UTF-8?q?#12970=20Fixed=20'String=20"=20not=20found'=20b?= =?UTF-8?q?ug=20in=20categories=20while=20saving=20guild=20descr=E2=80=A6?= =?UTF-8?q?=20(#12989)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * Fixed 'String " not found' bug in categories while saving guild description * syntax changes --- website/client/src/components/groups/groupFormModal.vue | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/website/client/src/components/groups/groupFormModal.vue b/website/client/src/components/groups/groupFormModal.vue index ad4666e5cf..d3355928d0 100644 --- a/website/client/src/components/groups/groupFormModal.vue +++ b/website/client/src/components/groups/groupFormModal.vue @@ -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 {