Skip to content

Commit e417f32

Browse files
fix(envcanada): set temperature to null when unavailable
Ensure current.temperature is always set (either to a value, cached value, or null) to prevent undefined temperature in weather display.
1 parent ab25cf4 commit e417f32

1 file changed

Lines changed: 2 additions & 0 deletions

File tree

defaultmodules/weather/providers/envcanada.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -161,6 +161,8 @@ class EnvCanadaProvider {
161161
this.cacheCurrentTemp = current.temperature;
162162
} else if (this.cacheCurrentTemp !== null) {
163163
current.temperature = this.cacheCurrentTemp;
164+
} else {
165+
current.temperature = null;
164166
}
165167

166168
// Wind

0 commit comments

Comments
 (0)