Closed jjavery closed 3 years ago
Array.prototype.reverse() reverses an array in place. This results in the unintended mutation of the coordinates property of encodePathOverlay()'s o (overlay) param. See a side-effect of this mutation in #412.
https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/reverse
Instead, create a new array and initialize it with the reversed lat and long.
Array.prototype.reverse() reverses an array in place. This results in the unintended mutation of the coordinates property of encodePathOverlay()'s o (overlay) param. See a side-effect of this mutation in #412.
https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/reverse
Instead, create a new array and initialize it with the reversed lat and long.