Skip to content

Commit c8809c0

Browse files
committed
Optimize overflow for StackLayout.makeChildren()
1 parent 0d222b7 commit c8809c0

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Sources/OpenSwiftUICore/Layout/Stack/StackLayout.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -130,7 +130,7 @@ struct StackLayout {
130130
if let uniformSpacing = header.uniformSpacing {
131131
distanceToPrevious = uniformSpacing
132132
} else {
133-
let previousSpacing = proxies[index-1].spacing
133+
let previousSpacing = proxies[index&-1].spacing
134134
let spacing = subview.spacing
135135
distanceToPrevious = previousSpacing.distance(to: spacing, along: header.majorAxis)
136136
}

0 commit comments

Comments
 (0)