Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions src/osrm-v1.js
Original file line number Diff line number Diff line change
Expand Up @@ -347,6 +347,7 @@
'&alternatives=' + computeAlternative.toString() +
'&steps=' + computeInstructions.toString() +
(this.options.useHints ? '&hints=' + hints.join(';') : '') +
(this.options.radiuses ? '&radiuses=' + locs.fill(this.options.radiuses).join(';') : '') +
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Array.prototype.fill is an ES6 method, and not supported in any IE version according to (https://developer.mozilla.org/en/docs/Web/JavaScript/Reference/Global_Objects/Array/fill); Leaflet Routing Machine still supports quite old IE versions.

Also, note that fill operates in place, overwriting the array - while this works in this case, it's setting up a trap for future modifications.

So, please use something more old school :)

(options.allowUTurns ? '&continue_straight=' + !options.allowUTurns : '');
},

Expand Down