aboutsummaryrefslogtreecommitdiff
path: root/web/app/controller
diff options
context:
space:
mode:
authorAnton Tananaev <anton.tananaev@gmail.com>2015-11-08 14:33:48 +1300
committerAnton Tananaev <anton.tananaev@gmail.com>2015-11-08 14:33:48 +1300
commit38134454c55b4a36f7c82686e3a29a9610050e6e (patch)
tree9cc0cb41713c1d9b17f1df17c41953a938f010be /web/app/controller
parent30f1a770f867de05a89ee6073dc002137d5e4512 (diff)
downloadtrackermap-server-38134454c55b4a36f7c82686e3a29a9610050e6e.tar.gz
trackermap-server-38134454c55b4a36f7c82686e3a29a9610050e6e.tar.bz2
trackermap-server-38134454c55b4a36f7c82686e3a29a9610050e6e.zip
Fix JavaScript check style issues
Diffstat (limited to 'web/app/controller')
-rw-r--r--web/app/controller/Root.js9
1 files changed, 4 insertions, 5 deletions
diff --git a/web/app/controller/Root.js b/web/app/controller/Root.js
index 94f3234d1..79827b8a6 100644
--- a/web/app/controller/Root.js
+++ b/web/app/controller/Root.js
@@ -96,16 +96,15 @@ Ext.define('Traccar.controller.Root', {
first: first
},
callback: Traccar.app.getErrorHandler(this, function (options, success, response) {
- var i, store, deviceStore, data;
+ var i, store, data, position;
if (success) {
store = Ext.getStore('LatestPositions');
- deviceStore = Ext.getStore('Devices');
data = Ext.decode(response.responseText).data;
for (i = 0; i < data.length; i++) {
- var found = store.findRecord('deviceId', data[i].deviceId, 0, false, false, true);
- if (found) {
- found.set(data[i]);
+ position = store.findRecord('deviceId', data[i].deviceId, 0, false, false, true);
+ if (position) {
+ position.set(data[i]);
} else {
store.add(Ext.create('Traccar.model.Position', data[i]));
}