Skip to content

Commit 329857d

Browse files
authored
Merge pull request jsx-eslint#1502 from SimenB/dupe-assertion
Remove duplicate assertion
2 parents 995b258 + 3260811 commit 329857d

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

lib/rules/destructuring-assignment.js

+3-3
Original file line numberDiff line numberDiff line change
@@ -74,9 +74,9 @@ module.exports = {
7474

7575
function handleClassUsage(node) {
7676
// this.props.Aprop || this.context.aProp || this.state.aState
77-
const isPropUsed = (node.object.type === 'MemberExpression' && node.object.object.type === 'ThisExpression' &&
78-
(node.object.property.name === 'props' || node.object.property.name === 'context' || node.object.property.name === 'state') &&
79-
node.object.type === 'MemberExpression'
77+
const isPropUsed = (
78+
node.object.type === 'MemberExpression' && node.object.object.type === 'ThisExpression' &&
79+
(node.object.property.name === 'props' || node.object.property.name === 'context' || node.object.property.name === 'state')
8080
);
8181

8282
if (isPropUsed && configuration === 'always') {

0 commit comments

Comments
 (0)