diff --git a/app/src/frontend/building/data-containers/age-history.tsx b/app/src/frontend/building/data-containers/age-history.tsx index 8100cbd2..00caa7c7 100644 --- a/app/src/frontend/building/data-containers/age-history.tsx +++ b/app/src/frontend/building/data-containers/age-history.tsx @@ -65,12 +65,14 @@ const AgeView: React.FunctionComponent = (props) => { const switchToAgeMapStyle = (e) => { e.preventDefault(); - if (props.mapColourScale == "survival_status") - { + if (historicData === 'enabled') { historicDataSwitchOnClick(e); } + if (historicMap === 'enabled') { + historicMapSwitchOnClick(e); + } - props.onMapColourScale('date_year') + props.onMapColourScale('date_year'); } const switchToStylePeriodMapStyle = (e) => { @@ -498,7 +500,7 @@ const AgeView: React.FunctionComponent = (props) => { Choose a colour to indicate whether the building has survived. - {(historicMap == "enabled") ? + {(historicMap === "enabled") ? @@ -507,7 +509,7 @@ const AgeView: React.FunctionComponent = (props) => { Click here to show the 1890s OS historical map. } - {(historicData == "enabled") ? + {(historicData === "enabled") ?