Skip to content
Snippets Groups Projects
Commit 940e0576 authored by Bucknell, Mary S.'s avatar Bucknell, Mary S.
Browse files

Added check for empty IV period of record before determining if flood stages should be fetched.

parent 5d203e49
No related branches found
No related tags found
1 merge request!43Wdfn 634
......@@ -103,7 +103,7 @@ export const attachToNode = function(store,
let fetchDataPromises = [fetchHydrographDataPromise];
// Fetch waterwatch flood levels
if (config.GAGE_HEIGHT_PARAMETER_CODE in config.ivPeriodOfRecord) {
if (config.ivPeriodOfRecord && config.GAGE_HEIGHT_PARAMETER_CODE in config.ivPeriodOfRecord) {
const fetchFloodLevelsPromise = store.dispatch(floodDataActions.retrieveWaterwatchData(siteno));
// If flood levels are to be shown then wait to render the hydrograph until those have been fetched.
if (parameterCode === config.GAGE_HEIGHT_PARAMETER_CODE) {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment