mirror of
https://github.com/netbymatt/ws4kp.git
synced 2026-04-14 15:49:31 -07:00
code cleanup
This commit is contained in:
@@ -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()];
|
||||
|
||||
Reference in New Issue
Block a user