We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 372e819 + 95f96be commit 2351f06Copy full SHA for 2351f06
Sources/ButtonBarPagerTabStripViewController.swift
@@ -259,11 +259,11 @@ open class ButtonBarPagerTabStripViewController: PagerTabStripViewController, Pa
259
260
if reload {
261
let indexPathsToReload = cells.enumerated()
262
- .flatMap { (arg) -> IndexPath? in
+ .compactMap { (arg) -> IndexPath? in
263
let (index, cell) = arg
264
return cell == nil ? indexPaths[index] : nil
265
}
266
- .flatMap { (indexPath: IndexPath) -> IndexPath? in
+ .compactMap { (indexPath: IndexPath) -> IndexPath? in
267
return (indexPath.item >= 0 && indexPath.item < buttonBarView.numberOfItems(inSection: indexPath.section)) ? indexPath : nil
268
269
0 commit comments