Skip to content

Commit

Permalink
Merge pull request #29 from wizeline/issue/28
Browse files Browse the repository at this point in the history
Fixes Issue #28
  • Loading branch information
leonardo-garcia authored May 9, 2019
2 parents 306bb1d + 3d4020a commit f0a5112
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions WLEmptyState/Classes/Protocols/WLEmptyStateProtocol.swift
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ extension WLEmptyStateProtocol where Self: UITableView {

var numberOfItems: Int {
var items = 0
let numberOfSections = dataSource?.numberOfSections?(in: self) ?? 0
let numberOfSections = dataSource?.numberOfSections?(in: self) ?? 1
for section in 0..<numberOfSections {
items += dataSource?.tableView(self, numberOfRowsInSection: section) ?? 0
}
Expand All @@ -66,7 +66,7 @@ extension WLEmptyStateProtocol where Self: UICollectionView {

var numberOfItems: Int {
var items = 0
let numberOfSections = dataSource?.numberOfSections?(in: self) ?? 0
let numberOfSections = dataSource?.numberOfSections?(in: self) ?? 1
for section in 0..<numberOfSections {
items += dataSource?.collectionView(self, numberOfItemsInSection: section) ?? 0
}
Expand Down

0 comments on commit f0a5112

Please sign in to comment.