]> git.openstreetmap.org Git - rails.git/commitdiff
rename internal variable
authorHolger Jeromin <mailgithub@katur.de>
Wed, 26 Feb 2020 19:27:52 +0000 (20:27 +0100)
committerGitHub <noreply@github.com>
Wed, 26 Feb 2020 19:27:52 +0000 (20:27 +0100)
app/assets/javascripts/index/directions.js

index 1c095a36b2d51450708d03f51653f04bb3718554..5f9027ec6b9bc85edd0f5c20739da3be2e09fa7c 100644 (file)
@@ -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({