Skip to content

Commit 0c510e9

Browse files
author
hduprat
committed
simplify concatenation
1 parent 115d09c commit 0c510e9

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

lib/rules/jsx-no-leaked-render.js

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -43,8 +43,7 @@ function getIsCoerceValidNestedLogicalExpression(node) {
4343
function extractExpressionBetweenLogicalAnds(node) {
4444
if (node.type !== 'LogicalExpression') return [node];
4545
if (node.operator !== '&&') return [node];
46-
const op = [];
47-
return op.concat(extractExpressionBetweenLogicalAnds(node.left), extractExpressionBetweenLogicalAnds(node.right));
46+
return [].concat(extractExpressionBetweenLogicalAnds(node.left), extractExpressionBetweenLogicalAnds(node.right));
4847
}
4948

5049
function ruleFixer(context, fixStrategy, fixer, reportedNode, leftNode, rightNode) {

0 commit comments

Comments
 (0)