diff --git a/pkg/weather/enrich.go b/pkg/weather/enrich.go index f86f3fa..5a3d2f7 100644 --- a/pkg/weather/enrich.go +++ b/pkg/weather/enrich.go @@ -5,6 +5,10 @@ import "math" // Attempts to complete missing fields that may not // be set by a specific provider, such as DewPoint and WindChill func (u *WeatherUpdate) Enrich() { + if u == nil { + return + } + if u.WindChillF == 0 { u.WindChillF = CalculateWindChill(u.TempOutdoorF, u.WindSpeedMPH) }