Skip to content

Commit 9d5f5ae

Browse files
authored
silenced warning ... (#73)
... and fixed the risk of a crash once the `var rows` and `var cols` are really used in a dynamic fashion as the `ForEach` loop would not get updated
1 parent 8e5e7b1 commit 9d5f5ae

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

Sources/AudioKitUI/Controls/TapCountingDrumPadGrid.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ public struct TapCountingDrumPadGrid: View {
6363
let padHeight = gp.size.height / CGFloat(rows)
6464
let columns = Array(repeating: GridItem(.fixed(padWidth)), count: cols)
6565
LazyVGrid(columns: columns, spacing: 10) {
66-
ForEach(0..<count) { idx in
66+
ForEach(0..<count, id: \.self) { idx in
6767
ZStack {
6868
if #available(iOS 15.0, *) {
6969
RoundedRectangle(cornerRadius: padWidth / 10)

0 commit comments

Comments
 (0)