Merge pull request #630 from fry0815/fix_temperature_check

Fix temperature check
This commit is contained in:
Michael Teeuw 2017-01-19 20:04:56 +01:00 committed by GitHub
commit 039c2fe0a6
2 changed files with 2 additions and 2 deletions

View File

@ -23,13 +23,13 @@ This project adheres to [Semantic Versioning](http://semver.org/).
- Init tests using mocha. - Init tests using mocha.
- Option to use RegExp in Calendar's titleReplace. - Option to use RegExp in Calendar's titleReplace.
### Fixed ### Fixed
- Update .gitignore to not ignore default modules folder. - Update .gitignore to not ignore default modules folder.
- Remove white flash on boot up. - Remove white flash on boot up.
- Added `update` in Raspberry Pi installation script. - Added `update` in Raspberry Pi installation script.
- Fix an issue where the analog clock looked scrambled. ([#611](https://github.com/MichMich/MagicMirror/issues/611)) - Fix an issue where the analog clock looked scrambled. ([#611](https://github.com/MichMich/MagicMirror/issues/611))
- If units is set to imperial, the showRainAmount option of weatherforecast will show the correct unit. - If units is set to imperial, the showRainAmount option of weatherforecast will show the correct unit.
- Module currentWeather: check if temperature received from api is defined.
## [2.1.0] - 2016-12-31 ## [2.1.0] - 2016-12-31

View File

@ -296,7 +296,7 @@ Module.register("currentweather",{
*/ */
processWeather: function(data) { processWeather: function(data) {
if (!data || !data.main || !data.main.temp) { if (!data || !data.main || typeof data.main.temp === "undefined") {
// Did not receive usable new data. // Did not receive usable new data.
// Maybe this needs a better check? // Maybe this needs a better check?
return; return;