]> git.openstreetmap.org Git - rails.git/blobdiff - app/assets/javascripts/index/directions.js
Update minimum ruby version to 3.2
[rails.git] / app / assets / javascripts / index / directions.js
index c472108ae105167de7430db26a3face52021708a..3d52ec9fb6b19a853e768f1bf3575d62f4db7e23 100644 (file)
@@ -75,8 +75,8 @@ OSM.Directions = function (map) {
 
   $(".directions_form .btn-close").on("click", function (e) {
     e.preventDefault();
-    $(".describe_location").toggle(!endpoints[0].value);
-    $(".search_form input[name='query']").val(endpoints[0].value);
+    $(".describe_location").toggle(!endpoints[1].value);
+    $(".search_form input[name='query']").val(endpoints[1].value);
     OSM.router.route("/" + OSM.formatHash(map));
   });