Skip to content

Commit

Permalink
fix(cli): 改进 Taro 组件判断方式
Browse files Browse the repository at this point in the history
  • Loading branch information
luckyadam committed Jul 10, 2019
1 parent 5c1d7ad commit ccaad35
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions packages/taro-cli/src/mini/component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
})

Expand Down

0 comments on commit ccaad35

Please sign in to comment.