From 802893e82aeaf7a8252daf2e9a2a441f3a8fbe33 Mon Sep 17 00:00:00 2001 From: Anton Tananaev Date: Mon, 27 Mar 2023 16:00:36 -0700 Subject: Improve value display --- modern/src/common/components/PositionValue.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'modern/src/common/components') diff --git a/modern/src/common/components/PositionValue.js b/modern/src/common/components/PositionValue.js index 6ffed9de..a819a018 100644 --- a/modern/src/common/components/PositionValue.js +++ b/modern/src/common/components/PositionValue.js @@ -43,15 +43,15 @@ const PositionValue = ({ position, property, attribute }) => { case 'altitude': return formatAltitude(value, altitudeUnit, t); case 'batteryLevel': - return value ? formatPercentage(value, t) : ''; + return value != null ? formatPercentage(value, t) : ''; case 'alarm': return formatAlarm(value, t); case 'odometer': case 'distance': case 'totalDistance': - return value ? formatDistance(value, distanceUnit, t) : ''; + return value != null ? formatDistance(value, distanceUnit, t) : ''; case 'hours': - return value ? formatNumericHours(value, t) : ''; + return value != null ? formatNumericHours(value, t) : ''; default: if (typeof value === 'number') { return formatNumber(value); -- cgit v1.2.3