fix virtual subcomponents not being read properly

This commit is contained in:
Henry Jameson 2024-11-25 19:35:15 +02:00
parent 877f8bec45
commit 02cf4fd43f

View file

@ -298,7 +298,7 @@ export default {
} }
if (hasChildren) { if (hasChildren) {
acc._children = acc._children ?? {} output._children = output._children ?? {}
const { const {
component: cComponent, component: cComponent,
variant: cVariant = 'normal', variant: cVariant = 'normal',
@ -307,7 +307,7 @@ export default {
} = child } = child
const cPath = `${cComponent}.${cVariant}.${normalizeStates(cState)}` const cPath = `${cComponent}.${cVariant}.${normalizeStates(cState)}`
set(output._children, cPath, directives) set(output._children, cPath, { directives })
} else { } else {
output.directives = parent.directives output.directives = parent.directives
} }
@ -628,14 +628,7 @@ export default {
onPalettesUpdate(palettesIn.map(x => ({ name: x.variant, ...x.directives }))) onPalettesUpdate(palettesIn.map(x => ({ name: x.variant, ...x.directives })))
Object.keys(allEditedRules.value).forEach((k) => delete allEditedRules.value[k]) allEditedRules.value = rulesToEditorFriendly(rules)
rules.forEach(rule => {
rulesToEditorFriendly(
[rule],
allEditedRules.value
)
})
exports.updateOverallPreview() exports.updateOverallPreview()
} }