From ccaad35975192bbc008ca05ee78248836055cbc4 Mon Sep 17 00:00:00 2001 From: luckyadam Date: Wed, 10 Jul 2019 17:53:09 +0800 Subject: [PATCH] =?UTF-8?q?fix(cli):=20=E6=94=B9=E8=BF=9B=20Taro=20?= =?UTF-8?q?=E7=BB=84=E4=BB=B6=E5=88=A4=E6=96=AD=E6=96=B9=E5=BC=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- packages/taro-cli/src/mini/component.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/taro-cli/src/mini/component.ts b/packages/taro-cli/src/mini/component.ts index 6aad6483e192..b24484af58f4 100644 --- a/packages/taro-cli/src/mini/component.ts +++ b/packages/taro-cli/src/mini/component.ts @@ -79,8 +79,8 @@ export function isFileToBeTaroComponent ( let isTaroComponent = false traverse(ast, { - JSXElement (astPath) { - isTaroComponent = !!astPath.findParent(p => (p.isReturnStatement() || p.isArrowFunctionExpression())) + JSXElement () { + isTaroComponent = true } })