From 430528f29c0b572770ec43f43ac285a354ba08de Mon Sep 17 00:00:00 2001 From: Anton Tananaev Date: Sun, 26 Jul 2015 11:39:01 +1200 Subject: Handle empty speed unit --- web/app/store/SpeedUnits.js | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'web') 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 ''; + } } }); -- cgit v1.2.3