From fd8cf84be770b609e24e6f6be78f9363169f6c7e Mon Sep 17 00:00:00 2001 From: Alec Ritson Date: Mon, 1 Aug 2022 08:43:49 +0100 Subject: [PATCH] Map into attribute data if empty --- hub-categories/src/pages/edit/CategoryDetails.vue | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/hub-categories/src/pages/edit/CategoryDetails.vue b/hub-categories/src/pages/edit/CategoryDetails.vue index 9f29631..9975b76 100644 --- a/hub-categories/src/pages/edit/CategoryDetails.vue +++ b/hub-categories/src/pages/edit/CategoryDetails.vue @@ -80,6 +80,14 @@ export default { if (attribute.group && !exists) { groups.push(attribute.group.data) } + + if (!data.attribute_data[attribute.handle]) { + this.$set(data.attribute_data, attribute.handle, { + [this.channel]: { + en: '' + } + }) + } }) groups = orderBy(groups, 'position', 'asc')