From 3c2a5c249d2a0cec1d5c371efcd1dfcf7e8c7f2e Mon Sep 17 00:00:00 2001 From: Anton Tananaev Date: Fri, 18 Aug 2017 11:22:48 +1200 Subject: Fix various style issues --- web/app/store/PositionAttributes.js | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) (limited to 'web/app/store/PositionAttributes.js') 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; } }, -- cgit v1.2.3