fixed config parameter typo

This commit is contained in:
Bryan Zhu
2020-06-30 04:18:03 -04:00
parent 4a162543f6
commit a4df38d963
2 changed files with 6 additions and 8 deletions

View File

@@ -66,7 +66,7 @@ WeatherProvider.register("openweathermap", {
return;
}
this.setFetchedLocation(`(${data.lat},${data.lon})`);
this.setFetchedLocation(`${data.lat},${data.lon}`);
const wData = this.generateWeatherObjectsFromOnecall(data);
this.setWeatherData(wData);

View File

@@ -155,14 +155,12 @@ Module.register("weather", {
}
setTimeout(() => {
if (this.config.type === "wDataCurrent"
|| this.config.type === "wDataHourly"
|| this.config.type === "wDataDaily") {
this.weatherProvider.fetchWeatherData();
} else if (this.config.type === "forecast") {
if (this.config.type === "forecast") {
this.weatherProvider.fetchWeatherForecast();
} else {
} else if (this.config.type === "current") {
this.weatherProvider.fetchCurrentWeather();
} else {
this.weatherProvider.fetchWeatherData();
}
}, nextLoad);
},
@@ -271,7 +269,7 @@ Module.register("weather", {
this.nunjucksEnvironment().addFilter(
"calcNumEntries",
function (dataArray) {
return Math.min(dataArray.length, this.config.maxNumberOfEntries);
return Math.min(dataArray.length, this.config.maxEntries);
}.bind(this)
);