Skip to content

Commit

Permalink
OpenWeatherMap: Fix "wego 0" functionality
Browse files Browse the repository at this point in the history
Same thing as 10d6ea5
  • Loading branch information
0x5c committed Nov 10, 2023
1 parent d5fc743 commit aff6b18
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions backends/openweathermap.org.go
Original file line number Diff line number Diff line change
Expand Up @@ -251,6 +251,10 @@ func (c *openWeatherConfig) Fetch(location string, numdays int) iface.Data {
if err != nil {
log.Fatalf("Failed to fetch weather data: %v\n", err)
}

if numdays == 0 {
return ret
}
ret.Forecast = c.parseDaily(resp.List, numdays)
return ret
}
Expand Down

0 comments on commit aff6b18

Please sign in to comment.