Skip to content

Commit

Permalink
OpenWeatherMap: Fix "wego 0" functionality (#175)
Browse files Browse the repository at this point in the history
Same thing as 10d6ea5
  • Loading branch information
0x5c authored Aug 25, 2024
1 parent d88a6a7 commit 4cac53c
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 4cac53c

Please sign in to comment.