InfiniteCarousel
InfiniteCarousel copied to clipboard
Removed preconditions and added guards
This will cause the app to not crash
Hi Brandon, Thank you for your PR.
Did the app crash for you? Was it the incorrect behaviour inside the library or the code, which was calling the library?
The reason why I used precondition check is for falling faster in case of a bug. Also to replicate the behaviour in UIKit – if I resemble correctly, passing incorrect indexPath
to for example this method will throw an exception. Probably, a better approach would be to throw an exception here, rather than just fail on precondition.