aboutsummaryrefslogtreecommitdiff
path: root/web/app/view/CustomNumberField.js
diff options
context:
space:
mode:
Diffstat (limited to 'web/app/view/CustomNumberField.js')
-rw-r--r--web/app/view/CustomNumberField.js4
1 files changed, 2 insertions, 2 deletions
diff --git a/web/app/view/CustomNumberField.js b/web/app/view/CustomNumberField.js
index 7e2b88e9..e116e934 100644
--- a/web/app/view/CustomNumberField.js
+++ b/web/app/view/CustomNumberField.js
@@ -24,7 +24,7 @@ Ext.define('Traccar.view.CustomNumberField', {
constructor: function (config) {
var unit;
- if (config.convert === 'speed') {
+ if (config.dataType === 'speed') {
unit = Traccar.app.getPreference('speedUnit', 'kn');
config.beforeSubTpl = this.beforeEl;
config.afterSubTpl = this.unitEl + Ext.getStore('SpeedUnits').findRecord('key', unit).get('name') + '</div></div>';
@@ -34,7 +34,7 @@ Ext.define('Traccar.view.CustomNumberField', {
config.valueToRaw = function (value) {
return Ext.getStore('SpeedUnits').convertValue(value, Traccar.app.getPreference('speedUnit', 'kn'));
};
- } else if (config.convert === 'distance') {
+ } else if (config.dataType === 'distance') {
config.beforeSubTpl = this.beforeEl;
unit = Traccar.app.getPreference('distanceUnit', 'km');
config.afterSubTpl = this.unitEl + Ext.getStore('DistanceUnits').findRecord('key', unit).get('name') + '</div></div>';