aboutsummaryrefslogtreecommitdiff
path: root/web/app
diff options
context:
space:
mode:
authorAbyss777 <abyss@fox5.ru>2017-03-15 14:38:04 +0500
committerAbyss777 <abyss@fox5.ru>2017-03-15 14:38:04 +0500
commit7135682a0f262dc4b76f41bec2db4c022f88b17b (patch)
treea50b36f4f3c5da83f8a13955331a4688c75e96b5 /web/app
parentccc2f0bd4387d7117a1c9b629be2d22edccb18d9 (diff)
downloadtrackermap-web-7135682a0f262dc4b76f41bec2db4c022f88b17b.tar.gz
trackermap-web-7135682a0f262dc4b76f41bec2db4c022f88b17b.tar.bz2
trackermap-web-7135682a0f262dc4b76f41bec2db4c022f88b17b.zip
Remove intermediate variable
Diffstat (limited to 'web/app')
-rw-r--r--web/app/controller/Root.js6
1 files changed, 3 insertions, 3 deletions
diff --git a/web/app/controller/Root.js b/web/app/controller/Root.js
index 8a9b0d9b..b6e5f385 100644
--- a/web/app/controller/Root.js
+++ b/web/app/controller/Root.js
@@ -124,7 +124,7 @@ Ext.define('Traccar.controller.Root', {
},
asyncUpdate: function (first) {
- var self = this, protocol, pathname, socket, firstPositions = first;
+ var self = this, protocol, pathname, socket;
protocol = window.location.protocol === 'https:' ? 'wss:' : 'ws:';
pathname = window.location.pathname.substring(0, window.location.pathname.lastIndexOf('/') + 1);
socket = new WebSocket(protocol + '//' + window.location.host + pathname + 'api/socket');
@@ -161,8 +161,8 @@ Ext.define('Traccar.controller.Root', {
self.updateDevices(data.devices);
}
if (data.positions) {
- self.updatePositions(data.positions, firstPositions);
- firstPositions = false;
+ self.updatePositions(data.positions, first);
+ first = false;
}
if (data.events) {
self.updateEvents(data.events);