Skip to content

Commit 0b10bb2

Browse files
committed
Wait for both stats requests to finish before binding sessions card VM
1 parent 8a22938 commit 0b10bb2

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -261,8 +261,8 @@ private extension AnalyticsHubViewModel {
261261
self.itemsSoldCard = AnalyticsHubViewModel.productsItemsSoldCard(itemsSoldStats: itemsSoldStats)
262262
}.store(in: &subscriptions)
263263

264-
Publishers.CombineLatest($currentOrderStats, $siteStats)
265-
.sink { [weak self] currentOrderStats, siteStats in
264+
$currentOrderStats.zip($siteStats)
265+
.sink { [weak self] (currentOrderStats, siteStats) in
266266
guard let self else { return }
267267

268268
self.sessionsCard = AnalyticsHubViewModel.sessionsCard(currentPeriodStats: currentOrderStats, siteStats: siteStats)

0 commit comments

Comments
 (0)