]> git.openstreetmap.org Git - rails.git/blobdiff - app/assets/javascripts/index/directions.js
Merge remote-tracking branch 'upstream/pull/5710'
[rails.git] / app / assets / javascripts / index / directions.js
index 2338f537f581224b3e141636e83b662857de8236..3d6da84fc8d279d51e723dc0babfd3f721833ebb 100644 (file)
@@ -73,8 +73,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));
   });