From f5960bacc081068532fa7a3c899a0b3349b0c2f8 Mon Sep 17 00:00:00 2001 From: Anton Tananaev Date: Sat, 31 Oct 2020 13:20:19 -0700 Subject: Move variables --- web/app/view/map/GeofenceMapController.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'web') diff --git a/web/app/view/map/GeofenceMapController.js b/web/app/view/map/GeofenceMapController.js index 237858a..31ab586 100644 --- a/web/app/view/map/GeofenceMapController.js +++ b/web/app/view/map/GeofenceMapController.js @@ -34,10 +34,11 @@ Ext.define('Traccar.view.map.GeofenceMapController', { }, onFileChange: function (fileField) { - var reader, parser, xml, segment, projection, points = [], view = this.getView(); + var reader, view = this.getView(); if (fileField.fileInputEl.dom.files.length > 0) { reader = new FileReader(); reader.onload = function () { + var parser, xml, segment, projection, points = []; parser = new DOMParser(); xml = parser.parseFromString(reader.result, 'text/xml'); segment = xml.getElementsByTagName('trkseg')[0]; -- cgit v1.2.3