This commit is contained in:
John Estropia
2019-10-29 20:18:14 +09:00
parent c112a84c0a
commit 6b9a4b480b
4 changed files with 23 additions and 10 deletions

View File

@@ -380,7 +380,7 @@ public enum TransformableContainer<O: CoreStoreObject> {
return customGetter(PartialObject<O>(object))
}
return object.value(forKey: self.keyPath) as! V?
return object.value(forKey: self.keyPath) as? V
}
}
set {
@@ -489,7 +489,7 @@ public enum TransformableContainer<O: CoreStoreObject> {
}
customSetter(
PartialObject<O>(rawObject),
newValue as! V?
newValue as? V
)
}
}