提交 a65e2788 编写于 作者: D DCloud_LXH

fix(mp): 小程序编译报错 question/161708

上级 07b32e95
......@@ -23,7 +23,11 @@ function findScoped (path, test, state) {
forIndex,
path: listPath
} = scoped
const funPath = path.findParent(path => path.isFunctionExpression() && path.parentPath.node.callee.name === METHOD_RENDER_LIST)
const funPath = path.findParent(path =>
path.isFunctionExpression() &&
t.isCallExpression(path.parentPath) &&
path.parentPath.node.callee.name === METHOD_RENDER_LIST
)
if (funPath && funPath.parentPath === listPath) {
// TODO 为兼容历史结构仅在当前 list 父级存在 v-if 返回
const parent = listPath.findParent(path => path.isFunctionExpression() || path.isConditionalExpression())
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册