diff options
Diffstat (limited to 'web/app')
-rw-r--r-- | web/app/AttributeFormatter.js | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/web/app/AttributeFormatter.js b/web/app/AttributeFormatter.js index 2ddfd61e..0c385672 100644 --- a/web/app/AttributeFormatter.js +++ b/web/app/AttributeFormatter.js @@ -63,9 +63,13 @@ Ext.define('Traccar.AttributeFormatter', { }, groupIdFormatter: function (value) { - var group; + var group, store; if (value !== 0) { - group = Ext.getStore(Ext.getStore('AllGroups').getTotalCount() === 0 ? 'Groups' : 'AllGroups').getById(value); + store = Ext.getStore('AllGroups'); + if (store.getTotalCount() === 0) { + store = Ext.getStore('Groups'); + } + group = store.getById(value); return group ? group.get('name') : value; } }, |