Skip to content

Commit 07a7c8f

Browse files
committed
Fixed guard.
1 parent 740dcb2 commit 07a7c8f

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

Sources/SPDiffable/DataSource/SPDiffableCollectionDataSource.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -100,8 +100,8 @@ open class SPDiffableCollectionDataSource: UICollectionViewDiffableDataSource<SP
100100
let previousSectionIndex = sectionIndex - 1
101101
guard (sections.count > previousSectionIndex) && (previousSectionIndex >= 0) else { continue }
102102
let previousSection = sections[previousSectionIndex]
103-
guard snapshot.sectionIdentifiers.first(where: { $0.identifier == section.identifier }) else { continue }
104-
guard snapshot.sectionIdentifiers.first(where: { $0.identifier == previousSection.identifier }) else { continue }
103+
guard let _ = snapshot.sectionIdentifiers.first(where: { $0.identifier == section.identifier }) else { continue }
104+
guard let _ = snapshot.sectionIdentifiers.first(where: { $0.identifier == previousSection.identifier }) else { continue }
105105
snapshot.moveSection(section, afterSection: previousSection)
106106
}
107107

0 commit comments

Comments
 (0)