From 8cc37a088368d0ae44d385fed9dca8da7106d3b1 Mon Sep 17 00:00:00 2001 From: jill-cardamon <43434254+jill-cardamon@users.noreply.github.com> Date: Tue, 13 Jul 2021 14:32:04 -0400 Subject: [PATCH] Fix bug where leg source and destination are mismatched when route contains trackpoint or silent waypoint --- Sources/MapboxDirections/DirectionsResult.swift | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Sources/MapboxDirections/DirectionsResult.swift b/Sources/MapboxDirections/DirectionsResult.swift index f5942c50f..0a317bfb8 100644 --- a/Sources/MapboxDirections/DirectionsResult.swift +++ b/Sources/MapboxDirections/DirectionsResult.swift @@ -41,8 +41,8 @@ open class DirectionsResult: Codable { //populate legs with origin and destination if let options = options as? DirectionsOptions { - let waypoints = options.waypoints - legs.populate(waypoints: waypoints) + let legSeparators = options.legSeparators + legs.populate(waypoints: legSeparators) } else { throw DirectionsCodingError.missingOptions }