Fix crash when refreshing before anything is loaded
This commit is contained in:
parent
340d13b1fa
commit
1d79918a94
|
@ -188,7 +188,8 @@ class DiffableTimelineLikeTableViewController<Section: Hashable & CaseIterable,
|
||||||
|
|
||||||
var item: Item? = nil
|
var item: Item? = nil
|
||||||
for section in timelineContentSections() {
|
for section in timelineContentSections() {
|
||||||
if let first = snapshot.itemIdentifiers(inSection: section).first {
|
if snapshot.indexOfSection(section) != nil,
|
||||||
|
let first = snapshot.itemIdentifiers(inSection: section).first {
|
||||||
item = first
|
item = first
|
||||||
break
|
break
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue