set weather updates on an interval

This commit is contained in:
Jon Heller 2015-10-18 22:13:59 -04:00
parent fc4e916a99
commit 0dee9c0bd9

View File

@ -135,16 +135,17 @@ weather.updateWeatherForecast = function () {
weather.init = function () {
if (weather.params.lang === undefined) {
weather.params.lang = weather.lang;
if (this.params.lang === undefined) {
this.params.lang = this.lang;
}
if (weather.params.cnt === undefined) {
weather.params.cnt = 5;
if (this.params.cnt === undefined) {
this.params.cnt = 5;
}
weather.updateCurrentWeather();
weather.updateWeatherForecast();
this.intervalId = setInterval(function () {
this.updateCurrentWeather();
this.updateWeatherForecast();
}.bind(this), this.updateInterval);
}