Reverse condition of a ternary for readability
Paul O’Shannessy committed
Aug 28, 2015 at 11:34 UTC
2e5b047f043b945991520bf74ca04c3fa4f08359
1 file changed
+1
-1
src/shared/utils/traverseAllChildren.js
+1
-1
@@ -119,7 +119,7 @@ function traverseAllChildrenImpl(
119
var child;
120
var nextName;
121
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;
123
124
if (Array.isArray(children)) {
125
for (var i = 0; i < children.length; i++) {