Skip to content

Commit

Permalink
fix(transformer): 修复 props 为 string 的情况
Browse files Browse the repository at this point in the history
  • Loading branch information
yuche committed Jul 19, 2018
1 parent b4c014d commit 8b0c9ce
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions packages/taro-transformer-wx/src/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,8 @@ export function findMethodName (expression: t.Expression) {
t.isJSXIdentifier(expression)
) {
methodName = expression.name
} else if (t.isStringLiteral(expression)) {
methodName = expression
} else if (
t.isMemberExpression(expression) &&
t.isIdentifier(expression.property)
Expand Down

0 comments on commit 8b0c9ce

Please sign in to comment.