From 7135682a0f262dc4b76f41bec2db4c022f88b17b Mon Sep 17 00:00:00 2001 From: Abyss777 Date: Wed, 15 Mar 2017 14:38:04 +0500 Subject: Remove intermediate variable --- web/app/controller/Root.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'web/app') diff --git a/web/app/controller/Root.js b/web/app/controller/Root.js index 8a9b0d9..b6e5f38 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); -- cgit v1.2.3