diff options
Diffstat (limited to 'web/app/store/PositionAttributes.js')
-rw-r--r-- | web/app/store/PositionAttributes.js | 12 |
1 files changed, 5 insertions, 7 deletions
diff --git a/web/app/store/PositionAttributes.js b/web/app/store/PositionAttributes.js index c3d6d180..e457dafc 100644 --- a/web/app/store/PositionAttributes.js +++ b/web/app/store/PositionAttributes.js @@ -240,14 +240,12 @@ Ext.define('Traccar.store.PositionAttributes', { var model = this.getById(key); if (model) { return model.get('name'); + } else if (capitalize) { + return key.replace(/^./, function (match) { + return match.toUpperCase(); + }); } else { - if (capitalize) { - return key.replace(/^./, function (match) { - return match.toUpperCase(); - }); - } else { - return key; - } + return key; } }, |