Skip to content

Commit

Permalink
Merge pull request #2 from ChaosTong/patch-1
Browse files Browse the repository at this point in the history
fix crash when data array count down
  • Loading branch information
NicolasKim committed Sep 13, 2017
2 parents 2286a9f + 3f73236 commit 7a54f3f
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions ELWaterFallLayout/Classes/ELWaterFlowLayout.swift
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,7 @@ open class ELWaterFlowLayout: UICollectionViewFlowLayout {
super.prepare()
resetLineWidth()
resetLineHeight()
attrArr.removeAll()

if let sectionCount = self.collectionView?.dataSource?.numberOfSections!(in: self.collectionView!) {
for section in 0..<sectionCount{
Expand Down

0 comments on commit 7a54f3f

Please sign in to comment.