diff --git a/CHANGELOG.md b/CHANGELOG.md index 1f4509b42..de34d6f3f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,8 @@ # Changelog +* Fix bug where app crashed if measurements JSON did not define thresholds ([#1802](https://github.com/nextstrain/auspice/pull/1802)) +* Fix bug where measurements display did not honor the default `measurements_display` ([#1802](https://github.com/nextstrain/auspice/pull/1802)) + ## version 2.56.0 - 2024/07/01 diff --git a/docs/introduction/install.rst b/docs/introduction/install.rst index d99c2a86b..39355b980 100644 --- a/docs/introduction/install.rst +++ b/docs/introduction/install.rst @@ -36,7 +36,7 @@ If you look at the :doc:`release notes <../releases/changelog>` you can see the Install Auspice as a developer ============================== -See `DEV_DOCS.md __`. +See `DEV_DOCS.md `__. Testing if it worked ==================== diff --git a/src/actions/measurements.js b/src/actions/measurements.js index ccdf1a9c7..bbdff7762 100644 --- a/src/actions/measurements.js +++ b/src/actions/measurements.js @@ -73,7 +73,7 @@ const getCollectionDisplayControls = (controls, collection) => { if (collection["display_defaults"]) { const { group_by, - measurement_display, + measurements_display, show_overall_mean, show_threshold } = collection["display_defaults"]; @@ -81,8 +81,8 @@ const getCollectionDisplayControls = (controls, collection) => { if (group_by) { newControls.measurementsGroupBy = group_by; } - if (measurement_display) { - newControls.measurementsDisplay = measurement_display; + if (measurements_display) { + newControls.measurementsDisplay = measurements_display; } if (typeof show_overall_mean === "boolean") { newControls.measurementsShowOverallMean = show_overall_mean; diff --git a/src/components/measurements/measurementsD3.js b/src/components/measurements/measurementsD3.js index a70025bac..a387e6fad 100644 --- a/src/components/measurements/measurementsD3.js +++ b/src/components/measurements/measurementsD3.js @@ -197,8 +197,9 @@ export const drawMeasurementsSVG = (ref, xAxisRef, svgData) => { drawStickyXAxis(xAxisRef, containerHeight, svgHeight, xScale, x_axis_label); // Add threshold(s) if provided - if (thresholds !== null) { + if (Array.isArray(thresholds)) { for (const threshold of thresholds) { + if (typeof threshold !== "number") continue; const thresholdXValue = xScale(threshold); svg.append("line") .attr("class", classes.threshold)