Skip to content

Commit 1e38e43

Browse files
committed
[fix]jsx-curly-brace-presence: minor refactor function hasManyChildren
1 parent 21d8470 commit 1e38e43

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

lib/rules/jsx-curly-brace-presence.js

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -210,10 +210,8 @@ module.exports = {
210210
}
211211

212212
function hasManyChildren(children) {
213-
if (children.length === 1) return false;
214-
215213
const childrenExcludingWhitespaceLiteral = children.filter(child => !isWhiteSpaceLiteral(child));
216-
return childrenExcludingWhitespaceLiteral.length !== 1;
214+
return childrenExcludingWhitespaceLiteral.length > 1;
217215
}
218216

219217
function shouldCheckForUnnecessaryCurly(parent, config) {

0 commit comments

Comments
 (0)