@@ -210,12 +210,12 @@ internal struct AnyMetatypeWrapper: Hashable, Equatable, Sendable {
210
210
state. otherProperties [ AnyMetatypeWrapper ( metatype: P . self) ] = newValue
211
211
212
212
// Generate an array of myself + children values of the property
213
- let flattenedChildrenValues : [ P . Value ? ] = {
213
+ let flattenedChildrenValues : [ P . Value ] = {
214
214
let childrenDictionary = state. childrenOtherProperties [ AnyMetatypeWrapper ( metatype: P . self) ]
215
- var childrenValues : [ P . Value ? ] = [ ]
215
+ var childrenValues : [ P . Value ] = [ ]
216
216
if let dictionary = childrenDictionary {
217
217
for (_, value) in dictionary {
218
- if let value = value as? [ P . Value ? ] {
218
+ if let value = value as? [ P . Value ] {
219
219
childrenValues. append ( contentsOf: value)
220
220
}
221
221
}
@@ -224,7 +224,7 @@ internal struct AnyMetatypeWrapper: Hashable, Equatable, Sendable {
224
224
} ( )
225
225
226
226
// Send the array of myself + children values of property to parents
227
- let updateValueForParent : [ P . Value ? ] = [ newValue] + flattenedChildrenValues
227
+ let updateValueForParent : [ P . Value ] = [ newValue] + flattenedChildrenValues
228
228
manager. parents. withLock { [ manager] parents in
229
229
for (parent, _) in parents {
230
230
parent. updateChildrenOtherProperties ( property: P . self, child: manager, value: updateValueForParent)
@@ -307,7 +307,7 @@ internal struct AnyMetatypeWrapper: Hashable, Equatable, Sendable {
307
307
/// Returns an array of values for specified property in subtree.
308
308
/// - Parameter metatype: Type of property.
309
309
/// - Returns: Array of values for property.
310
- public func values< P: Property > ( of property: P . Type ) -> [ P . Value ? ] {
310
+ public func values< P: Property > ( of property: P . Type ) -> [ P . Value ] {
311
311
_ $observationRegistrar. access ( self , keyPath: \. state)
312
312
return state. withLock { state in
313
313
let childrenValues = getFlattenedChildrenValues ( property: property, state: & state)
0 commit comments