Skip to content

Commit

Permalink
fix(transformer): 组件传参报错找不到代码,close #1711
Browse files Browse the repository at this point in the history
  • Loading branch information
yuche committed Dec 27, 2018
1 parent e7be572 commit cef17c3
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/taro-transformer-wx/src/class.ts
Original file line number Diff line number Diff line change
Expand Up @@ -394,7 +394,7 @@ class Transformer {
} else if (t.isMemberExpression(expr)) {
self.buildAnonymousFunc(attr, expr as any, false)
} else {
throw codeFrameError(expr.loc, '组件事件传参只能在类作用域下的确切引用(this.handleXX || this.props.handleXX),或使用 bind。')
throw codeFrameError(path.node, '组件事件传参只能在类作用域下的确切引用(this.handleXX || this.props.handleXX),或使用 bind。')
}
}
const jsx = path.findParent(p => p.isJSXOpeningElement()) as NodePath<t.JSXOpeningElement>
Expand Down

0 comments on commit cef17c3

Please sign in to comment.