[weather] Fix broken observation display for temperature of 0 °
ClosedPublic

Authored by kossebau on Nov 18 2018, 2:27 PM.

Details

Summary

For that also deduplicate any data extraction & conversion logic
in helper methods for consistency

Test Plan

Observation temperature of 0 ° no longer is shown as empty string,
all other data is shown as before (tested by hardcoding 0 as temperature in
the dataengine, to not have to wait for the next evening ;) ).

Diff Detail

Repository
R114 Plasma Addons
Branch
fix0DegreeTemperature
Lint
No Linters Available
Unit
No Unit Test Coverage
Build Status
Buildable 5238
Build 5256: arc lint + arc unit
kossebau created this revision.Nov 18 2018, 2:27 PM
Restricted Application added a project: Plasma. · View Herald TranscriptNov 18 2018, 2:27 PM
Restricted Application added a subscriber: plasma-devel. · View Herald Transcript
kossebau requested review of this revision.Nov 18 2018, 2:27 PM

Observation temperature of 0 ° no longer is shown as empty string,

Classic JS! well found.

It looks OK to me, but hopefully @broulik can have a look as quirky JS is his specialty.

kossebau updated this revision to Diff 45985.Nov 22 2018, 1:39 AM
  • use var data = weatherDataSource.currentData || {}; to simplify rest
  • use typeof number !== "undefined"
kossebau updated this revision to Diff 45986.Nov 22 2018, 1:41 AM

diff against correct branch

This revision was not accepted when it landed; it landed in state Needs Review.Nov 23 2018, 3:59 AM
This revision was automatically updated to reflect the committed changes.