diff options
author | Anton Tananaev <anton.tananaev@gmail.com> | 2015-07-26 11:39:01 +1200 |
---|---|---|
committer | Anton Tananaev <anton.tananaev@gmail.com> | 2015-07-26 11:39:01 +1200 |
commit | 430528f29c0b572770ec43f43ac285a354ba08de (patch) | |
tree | 66a0de25a8add12a589d454a2651b3f45d005a5f /web/app | |
parent | bd7a6ae5a724b6c23cb7f339c1ef7977662a779b (diff) | |
download | trackermap-server-430528f29c0b572770ec43f43ac285a354ba08de.tar.gz trackermap-server-430528f29c0b572770ec43f43ac285a354ba08de.tar.bz2 trackermap-server-430528f29c0b572770ec43f43ac285a354ba08de.zip |
Handle empty speed unit
Diffstat (limited to 'web/app')
-rw-r--r-- | web/app/store/SpeedUnits.js | 6 |
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 ''; + } } }); |