diff --git a/Targets/CanopyTypes/Sources/CanopyResultRecord/CanopyResultRecord.swift b/Targets/CanopyTypes/Sources/CanopyResultRecord/CanopyResultRecord.swift index 1d756e6..1627087 100644 --- a/Targets/CanopyTypes/Sources/CanopyResultRecord/CanopyResultRecord.swift +++ b/Targets/CanopyTypes/Sources/CanopyResultRecord/CanopyResultRecord.swift @@ -9,7 +9,10 @@ public struct CanopyResultRecord: Sendable { struct CKRecordEncryptedValuesReader: CanopyRecordValueGetting { let record: CKRecord subscript(key: String) -> CKRecordValueProtocol? { - return record.encryptedValues[key] + guard let value = record.encryptedValues[key] as? CKRecordValueProtocol else { + return nil + } + return value } }