apptekstudios / ASCollectionView

A SwiftUI collection view with support for custom layouts, preloading, and more.
MIT License
1.36k stars 160 forks source link

fix: set optional values to nil to fix not initialized error #148

Closed lawmicha closed 4 years ago

lawmicha commented 4 years ago

I ran into an issue installing the package via SPM (https://github.com/apptekstudios/ASCollectionView/issues/147) on 1.6.3

The package would not compile due to some optional values not being initialized. Setting their default initialized value to nil

apptekstudios commented 4 years ago

Thank you for the PR! This was a compiler bug that has been resolved since Xcode 11.4 - in Swift uninitialised optionals should be implicitly initialised to nil. Please let me know if the issue persists after updating Xcode, otherwise it might be best to leave the variables implicitly initialised 👍