fix and improve tests

This commit is contained in:
Henry Jameson 2025-02-18 18:30:08 +02:00
commit 97c9b6e25d
2 changed files with 6 additions and 5 deletions

View file

@ -154,13 +154,13 @@ componentsContext.keys().forEach(key => {
}
components[component.name] = component
})
Object.keys(components).forEach(key => {
if (key === 'Root') return
components.Root.validInnerComponents = components.Root.validInnerComponents || []
components.Root.validInnerComponents.push(key)
})
Object.keys(components).forEach(key => {
const component = components[key]
const { validInnerComponents = [] } = component
@ -571,6 +571,7 @@ export const init = ({
}
if (
!liteMode &&
parent?.component !== 'Root' &&
!virtualComponents.has(component.name) &&
!transparentComponents.has(component.name) &&