Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -384,7 +384,7 @@ struct DynamicContainerInfo<Adapter>: StatefulRule, AsyncAttribute, ObservedAttr
}
precondition(info.indexMap.count == inusedCount, "DynamicLayoutItem identifiers must be unique.")
if hasDepth {
let capacity = abs(removedCount != 0 ? validCount + inusedCount : validCount)
let capacity = max(removedCount != 0 ? validCount + inusedCount : validCount, 0)
var displayMap: [UInt32] = []
displayMap.reserveCapacity(capacity)
for index in 0 ..< validCount {
Expand Down
Loading