aboutsummaryrefslogtreecommitdiff
path: root/web
diff options
context:
space:
mode:
Diffstat (limited to 'web')
-rw-r--r--web/app/AttributeFormatter.js6
1 files changed, 1 insertions, 5 deletions
diff --git a/web/app/AttributeFormatter.js b/web/app/AttributeFormatter.js
index f8bce1b1..2ddfd61e 100644
--- a/web/app/AttributeFormatter.js
+++ b/web/app/AttributeFormatter.js
@@ -65,11 +65,7 @@ Ext.define('Traccar.AttributeFormatter', {
groupIdFormatter: function (value) {
var group;
if (value !== 0) {
- if (Ext.getStore('AllGroups').getTotalCount() === 0) {
- group = Ext.getStore('Groups').getById(value);
- } else {
- group = Ext.getStore('AllGroups').getById(value);
- }
+ group = Ext.getStore(Ext.getStore('AllGroups').getTotalCount() === 0 ? 'Groups' : 'AllGroups').getById(value);
return group ? group.get('name') : value;
}
},