aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--web/app/view/state/StateController.js6
1 files changed, 3 insertions, 3 deletions
diff --git a/web/app/view/state/StateController.js b/web/app/view/state/StateController.js
index 6b6ccf184..b6a6cc542 100644
--- a/web/app/view/state/StateController.js
+++ b/web/app/view/state/StateController.js
@@ -30,8 +30,8 @@ Ext.define('Traccar.view.state.StateController', {
init: function() {
var store = Ext.getStore('LiveData');
- store.on('add', this.add);
- store.on('update', this.update);
+ store.on('add', this.add, this);
+ store.on('update', this.update, this);
},
keys: {
@@ -100,7 +100,7 @@ Ext.define('Traccar.view.state.StateController', {
},
selectDevice: function(device) {
- this.deviceId = device.get('deviceId');
+ this.deviceId = device.get('id');
var found = Ext.getStore('LiveData').query('deviceId', this.deviceId);
if (found.getCount() > 0) {
this.updatePosition(found.first());