aboutsummaryrefslogtreecommitdiff
path: root/web/app/store
diff options
context:
space:
mode:
authorAnton Tananaev <anton.tananaev@gmail.com>2015-07-26 11:39:01 +1200
committerAnton Tananaev <anton.tananaev@gmail.com>2015-07-26 11:39:01 +1200
commit430528f29c0b572770ec43f43ac285a354ba08de (patch)
tree66a0de25a8add12a589d454a2651b3f45d005a5f /web/app/store
parentbd7a6ae5a724b6c23cb7f339c1ef7977662a779b (diff)
downloadtrackermap-server-430528f29c0b572770ec43f43ac285a354ba08de.tar.gz
trackermap-server-430528f29c0b572770ec43f43ac285a354ba08de.tar.bz2
trackermap-server-430528f29c0b572770ec43f43ac285a354ba08de.zip
Handle empty speed unit
Diffstat (limited to 'web/app/store')
-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 '';
+ }
}
});