Fix humidity check in curweather.go
Check for HumidityRelative instead of Dewpoint in the HumidityRelative() function to return correct "not available" status.
This commit is contained in:
parent
8cb9754f69
commit
681c53c23d
|
@ -148,7 +148,7 @@ func (cw CurrentWeather) Dewpoint() Temperature {
|
|||
// If the data point is not available in the CurrentWeather it will return
|
||||
// Humidity in which the "not available" field will be true.
|
||||
func (cw CurrentWeather) HumidityRelative() Humidity {
|
||||
if cw.Data.Dewpoint == nil {
|
||||
if cw.Data.HumidityRelative == nil {
|
||||
return Humidity{na: true}
|
||||
}
|
||||
v := Humidity{
|
||||
|
|
Loading…
Reference in a new issue