Skip to content

Commit

Permalink
fix(transformer-wx): enhancing the eslint checker (#4995)
Browse files Browse the repository at this point in the history
  • Loading branch information
zsir authored and luckyadam committed Dec 3, 2019
1 parent 3bbd955 commit 27d9905
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/eslint-plugin-taro/rules/render-props.js
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ module.exports = {
},
JSXAttribute (node) {
if (renderRE.test(node.name.name)) {
if (node.value.type !== 'JSXExpressionContainer') {
if (node.value && node.value.type !== 'JSXExpressionContainer') {
context.report({
message: '以 render 开头命名的 props 只能传入单个 JSX 元素或箭头函数',
node
Expand Down

0 comments on commit 27d9905

Please sign in to comment.