From 02cf4fd43f4505ee8d3b17399daaa8d0f868e4e9 Mon Sep 17 00:00:00 2001 From: Henry Jameson Date: Mon, 25 Nov 2024 19:35:15 +0200 Subject: [PATCH] fix virtual subcomponents not being read properly --- .../settings_modal/tabs/style_tab/style_tab.js | 13 +++---------- 1 file changed, 3 insertions(+), 10 deletions(-) diff --git a/src/components/settings_modal/tabs/style_tab/style_tab.js b/src/components/settings_modal/tabs/style_tab/style_tab.js index 5975afd7..bcf15665 100644 --- a/src/components/settings_modal/tabs/style_tab/style_tab.js +++ b/src/components/settings_modal/tabs/style_tab/style_tab.js @@ -298,7 +298,7 @@ export default { } if (hasChildren) { - acc._children = acc._children ?? {} + output._children = output._children ?? {} const { component: cComponent, variant: cVariant = 'normal', @@ -307,7 +307,7 @@ export default { } = child const cPath = `${cComponent}.${cVariant}.${normalizeStates(cState)}` - set(output._children, cPath, directives) + set(output._children, cPath, { directives }) } else { output.directives = parent.directives } @@ -628,14 +628,7 @@ export default { onPalettesUpdate(palettesIn.map(x => ({ name: x.variant, ...x.directives }))) - Object.keys(allEditedRules.value).forEach((k) => delete allEditedRules.value[k]) - - rules.forEach(rule => { - rulesToEditorFriendly( - [rule], - allEditedRules.value - ) - }) + allEditedRules.value = rulesToEditorFriendly(rules) exports.updateOverallPreview() }