From 4b3a779023c5a951fa1faae9f1579bf0dff41eb0 Mon Sep 17 00:00:00 2001 From: mbucknell <mbucknell@usgs.gov> Date: Mon, 8 Mar 2021 15:23:33 -0600 Subject: [PATCH] Fix setting of initial method id --- .../scripts/monitoring-location/components/hydrograph/index.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/assets/src/scripts/monitoring-location/components/hydrograph/index.js b/assets/src/scripts/monitoring-location/components/hydrograph/index.js index 3957098a2..41b54cf0f 100644 --- a/assets/src/scripts/monitoring-location/components/hydrograph/index.js +++ b/assets/src/scripts/monitoring-location/components/hydrograph/index.js @@ -110,7 +110,8 @@ export const attachToNode = function(store, showDataLoadingIndicator(false); // selectedIVMethodID should be set regardless of whether we are showing only the graph but the preferred method ID // can not be determined until the data is fetched so that is done here. - store.dispatch(setSelectedIVMethodID(timeSeriesId) || getPreferredIVMethodID(store.getState())); + const initialIVMethodID = timeSeriesId || getPreferredIVMethodID(store.getState()); + store.dispatch(setSelectedIVMethodID(initialIVMethodID)); let graphContainer = nodeElem.select('.graph-container'); graphContainer.call(drawTimeSeriesGraph, store, siteno, agencyCode, sitename, showMLName, !showOnlyGraph); -- GitLab