Skip to content

Commit

Permalink
Fixed PreferenceKey
Browse files Browse the repository at this point in the history
  • Loading branch information
kieranb662 committed Apr 11, 2020
1 parent 7e2db8a commit 8af79e6
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Sources/Sliders/Joystick.swift
Original file line number Diff line number Diff line change
Expand Up @@ -290,7 +290,7 @@ public struct Joystick: View {
struct JoyStickKey: PreferenceKey {
static var defaultValue: [Int:Anchor<CGRect>] { [:] }
static func reduce(value: inout [Int:Anchor<CGRect>], nextValue: () -> [Int:Anchor<CGRect>]) {
value = nextValue()
value.merge(nextValue(), uniquingKeysWith: {$1})
}
}
@Environment(\.joystickStyle) private var style: AnyJoystickStyle
Expand Down

0 comments on commit 8af79e6

Please sign in to comment.