Skip to content

Commit

Permalink
Minor tweak
Browse files Browse the repository at this point in the history
  • Loading branch information
fisker committed May 9, 2024
1 parent 5d4a63a commit ea70c88
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions rules/consistent-empty-array-spread.js
Expand Up @@ -100,14 +100,12 @@ const create = context => ({
for (const element of arrayExpression.elements) {
if (
element?.type !== 'SpreadElement'
|| element.argument.type !== 'ConditionalExpression'
|| element.argument.type !== 'ConditionalExpression'
) {
continue;
}

const conditionalExpression = element.argument;

yield getProblem(conditionalExpression, context);
yield getProblem(element.argument, context);
}
},
});
Expand Down

0 comments on commit ea70c88

Please sign in to comment.