aboutsummaryrefslogtreecommitdiff
path: root/modern
diff options
context:
space:
mode:
authorAnton Tananaev <anton@traccar.org>2023-03-27 16:00:36 -0700
committerAnton Tananaev <anton@traccar.org>2023-03-27 16:00:36 -0700
commit802893e82aeaf7a8252daf2e9a2a441f3a8fbe33 (patch)
tree0efcd16090de02aad2cb15c08f0c61104d81733b /modern
parent6402a8a53a9bac2791741c88a84c85c73c53ba91 (diff)
downloadtrackermap-web-802893e82aeaf7a8252daf2e9a2a441f3a8fbe33.tar.gz
trackermap-web-802893e82aeaf7a8252daf2e9a2a441f3a8fbe33.tar.bz2
trackermap-web-802893e82aeaf7a8252daf2e9a2a441f3a8fbe33.zip
Improve value display
Diffstat (limited to 'modern')
-rw-r--r--modern/src/common/components/PositionValue.js6
1 files changed, 3 insertions, 3 deletions
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);