From c70e919b472732fd3cf0ae340af28f2624278f6d Mon Sep 17 00:00:00 2001 From: Holger Jeromin Date: Wed, 26 Feb 2020 20:27:52 +0100 Subject: [PATCH] rename internal variable --- app/assets/javascripts/index/directions.js | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/app/assets/javascripts/index/directions.js b/app/assets/javascripts/index/directions.js index 1c095a36b..5f9027ec6 100644 --- a/app/assets/javascripts/index/directions.js +++ b/app/assets/javascripts/index/directions.js @@ -141,15 +141,15 @@ OSM.Directions = function (map) { } $(".directions_form .reverse_directions").on("click", function () { - var from = endpoints[0].latlng, - to = endpoints[1].latlng, + var coordFrom = endpoints[0].latlng, + coordTo = endpoints[1].latlng, routeFrom = "", routeTo = ""; - if (from) { - routeFrom = from.lat + "," + from.lng; + if (coordFrom) { + routeFrom = coordFrom.lat + "," + coordFrom.lng; } - if (to) { - routeTo = to.lat + "," + to.lng; + if (coordTo) { + routeTo = coordTo.lat + "," + coordTo.lng; } OSM.router.route("/directions?" + querystring.stringify({ -- 2.39.5