chore(compiler-core): define child
if necessary. (#2033)
This commit is contained in:
parent
09a939d37c
commit
b29bc0d694
@ -287,8 +287,8 @@ export function transform(root: RootNode, options: TransformOptions) {
|
||||
function createRootCodegen(root: RootNode, context: TransformContext) {
|
||||
const { helper } = context
|
||||
const { children } = root
|
||||
const child = children[0]
|
||||
if (children.length === 1) {
|
||||
const child = children[0]
|
||||
// if the single child is an element, turn it into a block.
|
||||
if (isSingleElementRoot(root, child) && child.codegenNode) {
|
||||
// single element root is never hoisted so codegenNode will never be
|
||||
|
Loading…
Reference in New Issue
Block a user