Skip to content

Commit 79bcf9f

Browse files
committed
Update NSDiffableDataSourceSnapshot+.swift
1 parent 8b8635e commit 79bcf9f

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

Sources/AdvancedCollectionTableView-iOS/Extensions/NSDiffableDataSourceSnapshot+.swift

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,9 @@ import UIKit
1010
extension NSDiffableDataSourceSnapshot {
1111
/// A Boolean value indicating whether the snapshot is empty.
1212
var isEmpty: Bool {
13-
numberOfItems == 0 && numberOfSections == 0
13+
if numberOfItems > 0 {
14+
return numberOfSections == 0
15+
}
16+
return true
1417
}
1518
}

0 commit comments

Comments
 (0)