aboutsummaryrefslogtreecommitdiff
path: root/web/app/store/PositionAttributes.js
diff options
context:
space:
mode:
Diffstat (limited to 'web/app/store/PositionAttributes.js')
-rw-r--r--web/app/store/PositionAttributes.js12
1 files changed, 5 insertions, 7 deletions
diff --git a/web/app/store/PositionAttributes.js b/web/app/store/PositionAttributes.js
index c3d6d18..e457daf 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;
}
},