]> git.openstreetmap.org Git - rails.git/commitdiff
Merge remote-tracking branch 'openstreetmap/pull/1040'
authorTom Hughes <tom@compton.nu>
Thu, 27 Aug 2015 20:30:50 +0000 (21:30 +0100)
committerTom Hughes <tom@compton.nu>
Thu, 27 Aug 2015 20:30:50 +0000 (21:30 +0100)
app/assets/javascripts/index/directions.js

index a8615d3eb11339f3cc7c35a39a9f06d28f00fdb5..a5f3b00802c1afd68c9d5b4c58cf800e1ba6caec 100644 (file)
@@ -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(','));