Skip to content

Commit 390c185

Browse files
committed
Update TaskGroup to throw errors
1 parent b05459f commit 390c185

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

WooCommerce/Classes/ViewRelated/Dashboard/Analytics Hub/AnalyticsHubViewModel.swift

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -100,13 +100,14 @@ private extension AnalyticsHubViewModel {
100100
let currentTimeRange = try timeRangeSelection.unwrapCurrentTimeRange()
101101
let previousTimeRange = try timeRangeSelection.unwrapPreviousTimeRange()
102102

103-
await withThrowingTaskGroup(of: Void.self) { group in
103+
try await withThrowingTaskGroup(of: Void.self) { group in
104104
group.addTask {
105105
try await self.retrieveOrderStats(currentTimeRange: currentTimeRange, previousTimeRange: previousTimeRange)
106106
}
107107
group.addTask {
108108
try await self.retrieveVisitorStats(currentTimeRange: currentTimeRange, previousTimeRange: previousTimeRange)
109109
}
110+
try await group.waitForAll()
110111
}
111112
}
112113

0 commit comments

Comments
 (0)