fix(compiler-core): should apply text transform to if branches

fix #725
This commit is contained in:
Evan You
2020-02-14 15:57:14 -05:00
parent 80904e92b8
commit e0f3c6b352
5 changed files with 21 additions and 12 deletions

View File

@@ -1,7 +1,7 @@
import {
createStructuralDirectiveTransform,
traverseChildren,
TransformContext
TransformContext,
traverseNode
} from '../transform'
import {
NodeTypes,
@@ -125,7 +125,7 @@ export function processIf(
const onExit = processCodegen && processCodegen(sibling, branch, false)
// since the branch was removed, it will not be traversed.
// make sure to traverse here.
traverseChildren(branch, context)
traverseNode(branch, context)
// call on exit
if (onExit) onExit()
// make sure to reset currentNode after traversal to indicate this