Skip to content

Commit 49e5ef6

Browse files
authored
Merge branch 'main' into web-696
2 parents 0089a92 + b936c69 commit 49e5ef6

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

Library/ViewModels/RootViewModel.swift

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -338,7 +338,11 @@ public final class RootViewModel: RootViewModelType, RootViewModelInputs, RootVi
338338

339339
let prevSelectedTabBarItem = Signal
340340
.combineLatest(prevSelectedIndex, self.tabBarItemsData)
341-
.map { index, data in tabBarItemLabel(for: data.items[index]) }
341+
.map { (index, data) -> KSRAnalytics.TabBarItemLabel in
342+
guard index < data.items.count else { return tabBarItemLabel(for: data.items[0]) }
343+
344+
return tabBarItemLabel(for: data.items[index])
345+
}
342346

343347
let searchTabBarSelected = Signal
344348
.combineLatest(self.didSelectIndexProperty.signal, self.tabBarItemsData)

0 commit comments

Comments
 (0)