Skip to content

Commit

Permalink
Merge pull request #1011 from wsuchy/issue-999
Browse files Browse the repository at this point in the history
Issue 999
  • Loading branch information
jameshadfield authored Apr 2, 2020
2 parents 7b5876a + 73a7df8 commit 1f2f9d4
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 4 deletions.
2 changes: 1 addition & 1 deletion src/components/info/info.js
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ export const createSummary = (mainTreeNumTips, nodes, filters, visibility, visib
let summary = ""; /* text returned from this function */

/* Number of genomes & their date range */
if (branchLengthsToDisplay !== "divOnly") {
if (branchLengthsToDisplay !== "divOnly" && nSelectedSamples > 0) {
summary += t(
"Showing {{x}} of {{y}} genomes sampled between {{from}} and {{to}}",
{
Expand Down
4 changes: 1 addition & 3 deletions src/util/treeVisibilityHelpers.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,7 @@ export const getVisibleDateRange = (nodes, visibility) => nodes
.filter((node, idx) => (visibility[idx] === NODE_VISIBLE && !node.hasChildren))
.reduce((acc, node) => {
const nodeDate = getTraitFromNode(node, "num_date");
if (nodeDate && nodeDate < acc[0]) return [nodeDate, acc[1]];
if (nodeDate && nodeDate > acc[1]) return [acc[0], nodeDate];
return acc;
return nodeDate ? [Math.min(nodeDate, acc[0]), Math.max(nodeDate, acc[1])] : acc;
}, [100000, -100000]);

export const strainNameToIdx = (nodes, name) => {
Expand Down

0 comments on commit 1f2f9d4

Please sign in to comment.