<p><b>@HolgerJeromin</b> commented on this pull request.</p>

<hr>

<p>In <a href="https://github.com/openstreetmap/openstreetmap-website/pull/2521#discussion_r370989543">app/assets/javascripts/index/directions.js</a>:</p>
<pre style='color:#555'>> @@ -142,12 +142,20 @@ OSM.Directions = function (map) {
 
   $(".directions_form .reverse_directions").on("click", function () {
     var from = endpoints[0].latlng,
-        to = endpoints[1].latlng;
+        to = endpoints[1].latlng,
+        routeFrom = "",
+        routeTo = "";
+    if (from) {
+      routeFrom = from.lat + "," + from.lng;
+    }
+    if (to) {
+      routeTo = to.lat + "," + to.lng;
+    }
 
     OSM.router.route("/directions?" + querystring.stringify({
       from: $("#route_to").val(),
       to: $("#route_from").val(),
</pre>
<p>Note that THESE <code>to</code> things is the property for the object of the <code>stringyfy</code> and not the variable six lines above</p>

<p style="font-size:small;-webkit-text-size-adjust:none;color:#666;">—<br />You are receiving this because you are subscribed to this thread.<br />Reply to this email directly, <a href="https://github.com/openstreetmap/openstreetmap-website/pull/2521?email_source=notifications&email_token=AAK2OLO2FEUDCIVVGMI3HEDQ7VTPXA5CNFSM4KLWABMKYY3PNVWWK3TUL52HS4DFWFIHK3DMKJSXC5LFON2FEZLWNFSXPKTDN5WW2ZLOORPWSZGOCTB3U7Y#pullrequestreview-348371583">view it on GitHub</a>, or <a href="https://github.com/notifications/unsubscribe-auth/AAK2OLJORZRXOTNET7B6AMDQ7VTPXANCNFSM4KLWABMA">unsubscribe</a>.<img src="https://github.com/notifications/beacon/AAK2OLMNW6SNK6EHPMTWXOLQ7VTPXA5CNFSM4KLWABMKYY3PNVWWK3TUL52HS4DFWFIHK3DMKJSXC5LFON2FEZLWNFSXPKTDN5WW2ZLOORPWSZGOCTB3U7Y.gif" height="1" width="1" alt="" /></p>
<script type="application/ld+json">[
{
"@context": "http://schema.org",
"@type": "EmailMessage",
"potentialAction": {
"@type": "ViewAction",
"target": "https://github.com/openstreetmap/openstreetmap-website/pull/2521?email_source=notifications\u0026email_token=AAK2OLO2FEUDCIVVGMI3HEDQ7VTPXA5CNFSM4KLWABMKYY3PNVWWK3TUL52HS4DFWFIHK3DMKJSXC5LFON2FEZLWNFSXPKTDN5WW2ZLOORPWSZGOCTB3U7Y#pullrequestreview-348371583",
"url": "https://github.com/openstreetmap/openstreetmap-website/pull/2521?email_source=notifications\u0026email_token=AAK2OLO2FEUDCIVVGMI3HEDQ7VTPXA5CNFSM4KLWABMKYY3PNVWWK3TUL52HS4DFWFIHK3DMKJSXC5LFON2FEZLWNFSXPKTDN5WW2ZLOORPWSZGOCTB3U7Y#pullrequestreview-348371583",
"name": "View Pull Request"
},
"description": "View this Pull Request on GitHub",
"publisher": {
"@type": "Organization",
"name": "GitHub",
"url": "https://github.com"
}
}
]</script>