Skip to content
This repository was archived by the owner on Apr 28, 2018. It is now read-only.

Commit ff97d93

Browse files
author
Emily Toop
committed
Issue 443 - Addressing Review Comments
1 parent ea803e4 commit ff97d93

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

Prox/Prox/Utilities/GoogleDirectionsMatrixTravelTimesProvider.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -120,7 +120,7 @@ class GoogleDirectionsMatrixTravelTimesProvider: TravelTimesProvider {
120120
let dataTask = sessionManager.dataTask(with: request) { response, object, error in
121121
if error != nil {
122122
NSLog("Error fetching Google Distance Matrix request \(error)")
123-
completion(nil)
123+
return completion(nil)
124124
}
125125

126126
guard let responseObject = object as? [String: Any],

Prox/Prox/Utilities/PlaceUtilities.swift

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,7 @@ struct PlaceUtilities {
4545
}
4646
let sortedByTravelTime: [Place] = sortedTravelTimes.flatMap { time in
4747
let placeIndex = sortedByDistance.index { place in
48+
// if the TravelTime does not have a place id, then we have to match TravelTimes to Places via it's coordinates instead
4849
return time.destinationPlaceKey == place.id
4950
|| (time.destination?.latitude == place.latLong.latitude && time.destination?.longitude == place.latLong.longitude)
5051
}

0 commit comments

Comments
 (0)