mirror of
https://github.com/MichMich/MagicMirror.git
synced 2025-06-29 12:39:45 +00:00
Merge pull request #486 from roramirez/fix_location_id_empty
currentweather, weatherforecast: fix locationID empty
This commit is contained in:
commit
ced412372c
@ -259,9 +259,9 @@ Module.register("currentweather",{
|
||||
*/
|
||||
getParams: function() {
|
||||
var params = "?";
|
||||
if(this.config.locationID !== false) {
|
||||
if(this.config.locationID) {
|
||||
params += "id=" + this.config.locationID;
|
||||
} else if(this.config.location !== false) {
|
||||
} else if(this.config.location) {
|
||||
params += "q=" + this.config.location;
|
||||
} else if (this.firstEvent && this.firstEvent.geo) {
|
||||
params += "lat=" + this.firstEvent.geo.lat + "&lon=" + this.firstEvent.geo.lon
|
||||
|
@ -249,9 +249,9 @@ Module.register("weatherforecast",{
|
||||
*/
|
||||
getParams: function() {
|
||||
var params = "?";
|
||||
if(this.config.locationID !== false) {
|
||||
if(this.config.locationID) {
|
||||
params += "id=" + this.config.locationID;
|
||||
} else if(this.config.location !== false) {
|
||||
} else if(this.config.location) {
|
||||
params += "q=" + this.config.location;
|
||||
} else if (this.firstEvent && this.firstEvent.geo) {
|
||||
params += "lat=" + this.firstEvent.geo.lat + "&lon=" + this.firstEvent.geo.lon
|
||||
|
Loading…
x
Reference in New Issue
Block a user