fix parsing of state

This commit is contained in:
Matt Walsh
2020-10-16 15:30:27 -05:00
parent 165fbd7018
commit ebb715d362
2 changed files with 7 additions and 7 deletions

View File

@@ -21,9 +21,9 @@ class RegionalForecast extends WeatherDisplay {
// pre-load the base map (returns promise)
let src = 'images/Basemap2.png';
if (weatherParameters.State === 'HI') {
if (weatherParameters.state === 'HI') {
src = 'images/HawaiiRadarMap4.png';
} else if (weatherParameters.State === 'AK') {
} else if (weatherParameters.state === 'AK') {
src = 'images/AlaskaRadarMap6.png';
}
this.baseMap = utils.image.load(src);
@@ -41,7 +41,7 @@ class RegionalForecast extends WeatherDisplay {
// get a target distance
let targetDistance = 2.5;
if (weatherParameters.State === 'HI') targetDistance = 1;
if (weatherParameters.state === 'HI') targetDistance = 1;
// make station info into an array
const stationInfoArray = Object.keys(_StationInfo).map(key => Object.assign({}, _StationInfo[key], {targetDistance}));