Skip to content

Commit 2351f06

Browse files
author
Martin Barreto
authored
Merge pull request #570 from Nixsm/master
Removing deprecated flatMap
2 parents 372e819 + 95f96be commit 2351f06

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

Sources/ButtonBarPagerTabStripViewController.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -259,11 +259,11 @@ open class ButtonBarPagerTabStripViewController: PagerTabStripViewController, Pa
259259

260260
if reload {
261261
let indexPathsToReload = cells.enumerated()
262-
.flatMap { (arg) -> IndexPath? in
262+
.compactMap { (arg) -> IndexPath? in
263263
let (index, cell) = arg
264264
return cell == nil ? indexPaths[index] : nil
265265
}
266-
.flatMap { (indexPath: IndexPath) -> IndexPath? in
266+
.compactMap { (indexPath: IndexPath) -> IndexPath? in
267267
return (indexPath.item >= 0 && indexPath.item < buttonBarView.numberOfItems(inSection: indexPath.section)) ? indexPath : nil
268268
}
269269

0 commit comments

Comments
 (0)