]> git.openstreetmap.org Git - rails.git/blobdiff - app/assets/javascripts/index/directions/osrm.js
Merge branch 'master' into moderation
[rails.git] / app / assets / javascripts / index / directions / osrm.js
index 5c29f6c4d4a55cf758309860baccb2bd00e957d2..e31c053ef7877bb62b5469c3dcbd83e71df147a5 100644 (file)
@@ -111,7 +111,11 @@ function OSRMEngine() {
         }
 
         if (step.maneuver.type.match(/rotary|roundabout/)) {
-          instText += I18n.t(template + '_with_exit', { exit: step.maneuver.exit, name: name } );
+          if (step.maneuver.exit) {
+            instText += I18n.t(template + '_with_exit', { exit: step.maneuver.exit, name: name } );
+          } else {
+            instText += I18n.t(template + '_without_exit', { name: name } );
+          }
         } else if (step.maneuver.type.match(/on ramp|off ramp/)) {
           if (step.destinations) {
             if (namedRoad) {