diff options
Diffstat (limited to 'web/app/AttributeFormatter.js')
-rw-r--r-- | web/app/AttributeFormatter.js | 6 |
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; } }, |