aboutsummaryrefslogtreecommitdiff
path: root/web/app/view/map
diff options
context:
space:
mode:
Diffstat (limited to 'web/app/view/map')
-rw-r--r--web/app/view/map/MapController.js7
1 files changed, 1 insertions, 6 deletions
diff --git a/web/app/view/map/MapController.js b/web/app/view/map/MapController.js
index cad8f502a..cbe3ea6c3 100644
--- a/web/app/view/map/MapController.js
+++ b/web/app/view/map/MapController.js
@@ -49,16 +49,11 @@ Ext.define('Traccar.view.map.MapController', {
var i;
for (i = 0; i < data.length; i++) {
- // TODO check if exists and update
var store = Ext.getStore('LiveData');
var found = store.query('deviceId', data[i].deviceId);
if (found.getCount() > 0) {
- var model = found.first();
- model.set(data[i]);
-
- //store.commitChanges(); need for update?
-
+ found.first().set(data[i]);
} else {
store.add(Ext.create('Traccar.model.Position', data[i]));
}