Skip to content

Commit 2e5b047

Browse files
committed
Reverse condition of a ternary for readability
1 parent 024f715 commit 2e5b047

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/shared/utils/traverseAllChildren.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -119,7 +119,7 @@ function traverseAllChildrenImpl(
119119
var child;
120120
var nextName;
121121
var subtreeCount = 0; // Count of children found in the current subtree.
122-
var nextNamePrefix = nameSoFar !== '' ? nameSoFar + SUBSEPARATOR : SEPARATOR;
122+
var nextNamePrefix = nameSoFar === '' ? SEPARATOR : nameSoFar + SUBSEPARATOR;
123123

124124
if (Array.isArray(children)) {
125125
for (var i = 0; i < children.length; i++) {

0 commit comments

Comments
 (0)