diff --git a/src/openweathermap_org.js b/src/openweathermap_org.js index d814078..3059f90 100644 --- a/src/openweathermap_org.js +++ b/src/openweathermap_org.js @@ -373,6 +373,9 @@ function parseWeatherCurrent() { function refreshWeatherCurrent() { this.oldLocation = this.extractCoord(this._city); + if (this.oldLocation.search(",") == -1) + return; + let params = { lat: this.oldLocation.split(",")[0], lon: this.oldLocation.split(",")[1], @@ -448,6 +451,9 @@ function refreshWeatherForecast() { this.oldLocation = this.extractCoord(this._city); + if (this.oldLocation.search(",") == -1) + return; + let params = { lat: this.oldLocation.split(",")[0], lon: this.oldLocation.split(",")[1],