Reverse condition of a ternary for readability

This commit is contained in:
Paul O’Shannessy
2015-08-28 11:34:50 -07:00
parent 024f71535c
commit 2e5b047f04

View File

@@ -119,7 +119,7 @@ function traverseAllChildrenImpl(
var child;
var nextName;
var subtreeCount = 0; // Count of children found in the current subtree.
var nextNamePrefix = nameSoFar !== '' ? nameSoFar + SUBSEPARATOR : SEPARATOR;
var nextNamePrefix = nameSoFar === '' ? SEPARATOR : nameSoFar + SUBSEPARATOR;
if (Array.isArray(children)) {
for (var i = 0; i < children.length; i++) {