Skip to content

Commit

Permalink
Merge branch '593'
Browse files Browse the repository at this point in the history
* 593:
  Scan internal nodes for attr values. Closes #593
  • Loading branch information
jameshadfield committed Jul 9, 2018
2 parents d8242fc + 1a4b1ec commit ea46761
Showing 1 changed file with 0 additions and 2 deletions.
2 changes: 0 additions & 2 deletions src/util/treeCountingHelpers.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ export const getAllValuesAndCountsOfTraitsFromTree = (nodes, attrs) => {
const attr = attrs;
stateCount[attr] = {};
nodes.forEach((n) => {
if (n.hasChildren) {return;}
if (!n.attr[attr] || n.attr[attr] === "undefined" || n.attr[attr] === "?") {return;}
stateCount[attr][n.attr[attr]] ? stateCount[attr][n.attr[attr]] += 1 : stateCount[attr][n.attr[attr]] = 1;
});
Expand All @@ -20,7 +19,6 @@ export const getAllValuesAndCountsOfTraitsFromTree = (nodes, attrs) => {
stateCount[attr] = {};
}
nodes.forEach((n) => {
if (n.hasChildren) {return;}
for (const attr of attrs) {
if (!n.attr[attr] || n.attr[attr] === "undefined" || n.attr[attr] === "?") {return;}
// attr is "country" or "author" etc
Expand Down

0 comments on commit ea46761

Please sign in to comment.