code cleanup

This commit is contained in:
Matt Walsh
2022-12-14 13:08:49 -06:00
parent 49296e53f0
commit 2a577aaea7
4 changed files with 18 additions and 18 deletions

View File

@@ -65,6 +65,7 @@ const getWeather = async (latLon, haveDataCallback) => {
if (StationId in StationInfo) {
city = StationInfo[StationId].city;
[city] = city.split('/');
city = city.replace(/\s+$/, '');
}
// populate the weather parameters
@@ -201,7 +202,7 @@ const loadDisplay = (direction) => {
// get the current display index or value
const currentDisplayIndex = () => {
const index = displays.findIndex((display) => display.isActive());
const index = displays.findIndex((display) => display.active);
return index;
};
const currentDisplay = () => displays[currentDisplayIndex()];