File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed
Sources/SwiftCrossUI/Environment Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change 3737@propertyWrapper
3838public struct Environment < Value> : DynamicProperty {
3939 var keyPath : KeyPath < EnvironmentValues , Value > ?
40- var environmentKey : EnvironmentKey . Type ?
40+ var environmentKey : ( any EnvironmentKey . Type ) ?
4141 var value : Box < Value ? >
4242
4343 public func update(
@@ -47,15 +47,15 @@ public struct Environment<Value>: DynamicProperty {
4747 if let keyPath {
4848 value. value = environment [ keyPath: keyPath]
4949 } else if let environmentKey {
50- value. value = environment [ environmentKey] as! Value
50+ value. value = ( environment [ environmentKey] as! Value )
5151 }
5252 }
5353
5454 public var wrappedValue : Value {
5555 guard let value = value. value else {
5656 fatalError (
5757 """
58- Environment value \( keyPath) used before initialization. Don't \
58+ Environment value \( keyPath. debugDescription ) used before initialization. Don't \
5959 use @Environment properties before SwiftCrossUI requests the \
6060 view's body.
6161 """
You can’t perform that action at this time.
0 commit comments