File tree Expand file tree Collapse file tree 1 file changed +6
-5
lines changed
Expand file tree Collapse file tree 1 file changed +6
-5
lines changed Original file line number Diff line number Diff line change @@ -55,8 +55,6 @@ public final class PledgeShippingLocationViewModel: PledgeShippingLocationViewMo
5555 .ignoreValues()
5656 .switchMap { _ in
5757 shippableLocations()
58- .wrapInOptional()
59- .demoteErrors(replaceErrorWith: nil)
6058 }
6159
6260 let loadedLocations = locations.skipNil()
@@ -178,12 +176,15 @@ private func determineShippingLocation(
178176 return defaultShippingLocation(fromLocations: locations)
179177}
180178
181- private func shippableLocations() -> SignalProducer<[Location], ErrorEnvelope > {
179+ private func shippableLocations() -> SignalProducer<[Location]?, Never > {
182180 let query = GraphAPI.ShippableLocationsQuery()
183- let signal = AppEnvironment.current.apiService.fetch(query: query)
181+ let producer = AppEnvironment.current.apiService.fetch(query: query)
184182 .map { data in
185183 let locations = Location.locations(from: data)
186184 return locations
187185 }
188- return signal
186+
187+ return producer
188+ .wrapInOptional()
189+ .demoteErrors(replaceErrorWith: nil)
189190}
You can’t perform that action at this time.
0 commit comments