X-Git-Url: https://git.openstreetmap.org./rails.git/blobdiff_plain/05caad1a5dfbdf892f4b46b0916a4f6b1de4d2e3..db7374f2bbdd0b3ee0f3cb0a9cca84f9c72cffb5:/app/assets/javascripts/index/directions.js diff --git a/app/assets/javascripts/index/directions.js b/app/assets/javascripts/index/directions.js index a8615d3eb..a5f3b0080 100644 --- a/app/assets/javascripts/index/directions.js +++ b/app/assets/javascripts/index/directions.js @@ -336,13 +336,8 @@ OSM.Directions = function (map) { setEngine(params.engine); } - if (params.from) { - endpoints[0].setValue(params.from); - endpoints[1].setValue(""); - } else { - endpoints[0].setValue(""); - endpoints[1].setValue(""); - } + endpoints[0].setValue(params.from || ""); + endpoints[1].setValue(params.to || ""); var o = route[0] && L.latLng(route[0].split(',')), d = route[1] && L.latLng(route[1].split(','));