Only show timestamp when it has a value

This commit is contained in:
Julia Friesel
2019-06-23 11:46:20 +02:00
parent 6065470b2f
commit 6628543141
+4 -1
View File
@@ -60,7 +60,10 @@ export default class CycleDayOverView extends Component {
},
temperature: temperature => {
if (isNumber(temperature.value)) {
let temperatureLabel = `${temperature.value} °C - ${temperature.time}`
let temperatureLabel = `${temperature.value} °C`
if (temperature.time) {
temperatureLabel = `${temperatureLabel} - ${temperature.time}`
}
if (temperature.exclude) {
temperatureLabel = "( " + temperatureLabel + " )"
}