Merge pull request #5 from thr1llseek3r/fix_scrollToItem_add_debugPrint

Fix scrollToItem add debugPrint
This commit is contained in:
Sergey 2021-12-22 11:46:29 +03:00 committed by GitHub
commit f3e95c90ec
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -512,7 +512,7 @@ open class FSPagerView: UIView,UICollectionViewDataSource,UICollectionViewDelega
@objc(scrollToItemAtIndex:animated:)
open func scrollToItem(at index: Int, animated: Bool) {
guard index < self.numberOfItems else {
assertionFailure("index \(index) is out of range [0...\(self.numberOfItems-1)]")
debugPrint("index \(index) is out of range [0...\(self.numberOfItems-1)]")
return
}
let indexPath = { () -> IndexPath in