Skip to content

Commit

Permalink
fix(eslint): 修复render props传入单个JSX元素或箭头函数报错的问题 (#3906)
Browse files Browse the repository at this point in the history
  • Loading branch information
eteplus authored and yuche committed Jul 25, 2019
1 parent 579c7f9 commit 2d3bd05
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions packages/eslint-plugin-taro/rules/render-props.js
Original file line number Diff line number Diff line change
Expand Up @@ -36,9 +36,9 @@ module.exports = {
})
return
}
if (node.value.expression.type !== 'JSXElement' || node.value.expression.type !== 'ArrowFunctionExpression') {
if (node.value.expression.type !== 'JSXElement' && node.value.expression.type !== 'ArrowFunctionExpression') {
context.report({
message: '以 render 开头命名的 props 只能传入单个 JSX 元素元素或箭头函数',
message: '以 render 开头命名的 props 只能传入单个 JSX 元素或箭头函数',
node
})
}
Expand Down

0 comments on commit 2d3bd05

Please sign in to comment.