aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--web/app/view/map/GeofenceMapController.js3
1 files changed, 2 insertions, 1 deletions
diff --git a/web/app/view/map/GeofenceMapController.js b/web/app/view/map/GeofenceMapController.js
index 237858ad..31ab586c 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];