aboutsummaryrefslogtreecommitdiff
path: root/web
diff options
context:
space:
mode:
Diffstat (limited to 'web')
-rw-r--r--web/app/store/SpeedUnits.js6
1 files changed, 5 insertions, 1 deletions
diff --git a/web/app/store/SpeedUnits.js b/web/app/store/SpeedUnits.js
index ee345621b..f4d4b8266 100644
--- a/web/app/store/SpeedUnits.js
+++ b/web/app/store/SpeedUnits.js
@@ -33,6 +33,10 @@ Ext.define('Traccar.store.SpeedUnits', {
},
getUnitName: function(unit) {
- return this.findRecord('key', unit).get('name');
+ if (unit) {
+ return this.findRecord('key', unit).get('name');
+ } else {
+ return '';
+ }
}
});