diff options
author | Anton Tananaev <anton@traccar.org> | 2022-05-24 08:40:34 -0700 |
---|---|---|
committer | Anton Tananaev <anton@traccar.org> | 2022-05-24 08:40:34 -0700 |
commit | 6be52083821198a8f980c29be987f71898b6b4c6 (patch) | |
tree | 887c8c78c8aba0661e384a8d10a591b03960ce9c /modern/src/common/util/formatter.js | |
parent | 568530fe2dd1413739a73eb0a576a90e764f14a6 (diff) | |
download | trackermap-web-6be52083821198a8f980c29be987f71898b6b4c6.tar.gz trackermap-web-6be52083821198a8f980c29be987f71898b6b4c6.tar.bz2 trackermap-web-6be52083821198a8f980c29be987f71898b6b4c6.zip |
Fix alarm issue (fix #941)
Diffstat (limited to 'modern/src/common/util/formatter.js')
-rw-r--r-- | modern/src/common/util/formatter.js | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/modern/src/common/util/formatter.js b/modern/src/common/util/formatter.js index 08e29bc4..c28d492d 100644 --- a/modern/src/common/util/formatter.js +++ b/modern/src/common/util/formatter.js @@ -14,7 +14,7 @@ export const formatDate = (value, format = 'YYYY-MM-DD HH:mm') => moment(value). export const formatTime = (value, format = 'YYYY-MM-DD HH:mm:ss') => moment(value).format(format); export const formatStatus = (value, t) => t(prefixString('deviceStatus', value)); -export const formatAlarm = (value, t) => t(prefixString('alarm', value)); +export const formatAlarm = (value, t) => value ? t(prefixString('alarm', value)) : ''; export const formatCourse = (value) => { const courseValues = ['N', 'NE', 'E', 'SE', 'S', 'SW', 'W', 'NW']; |