fix(compiler): props hoist should also work on elements w/ TEXT flag
This commit is contained in:
parent
9c9ef609d8
commit
21666243e9
@ -35,7 +35,11 @@ function walk(
|
||||
// node may contain dynamic children, but its props may be eligible for
|
||||
// hoisting.
|
||||
const flag = getPatchFlag(child)
|
||||
if (!flag || flag === PatchFlags.NEED_PATCH) {
|
||||
if (
|
||||
!flag ||
|
||||
flag === PatchFlags.NEED_PATCH ||
|
||||
flag === PatchFlags.TEXT
|
||||
) {
|
||||
let codegenNode = child.codegenNode as CallExpression
|
||||
if (codegenNode.callee.includes(APPLY_DIRECTIVES)) {
|
||||
codegenNode = codegenNode.arguments[0] as CallExpression
|
||||
|
Loading…
Reference in New Issue
Block a user