diff options
Diffstat (limited to 'web/app/view/StateController.js')
-rw-r--r-- | web/app/view/StateController.js | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/web/app/view/StateController.js b/web/app/view/StateController.js index 29f6a7c6d..819c203c4 100644 --- a/web/app/view/StateController.js +++ b/web/app/view/StateController.js @@ -116,9 +116,9 @@ Ext.define('Traccar.view.StateController', { selectDevice: function (device) { var found; this.deviceId = device.get('id'); - found = Ext.getStore('LatestPositions').query('deviceId', this.deviceId); - if (found.getCount() > 0) { - this.updatePosition(found.first()); + found = Ext.getStore('LatestPositions').findRecord('deviceId', this.deviceId, 0, false, false, true); + if (found) { + this.updatePosition(found); } else { Ext.getStore('Attributes').removeAll(); } |