Skip to content

Commit

Permalink
Fixed CodableTransform for the case where the item is an array
Browse files Browse the repository at this point in the history
  • Loading branch information
falkobuttler committed Dec 8, 2018
1 parent feb763a commit a3703a1
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Sources/CodableTransform.swift
Expand Up @@ -56,7 +56,7 @@ open class CodableTransform<T: Codable>: TransformType {
do {
let encoder = JSONEncoder()
let data = try encoder.encode(item)
let dictionary = try JSONSerialization.jsonObject(with: data, options: .allowFragments) as? [String: Any]
let dictionary = try JSONSerialization.jsonObject(with: data, options: .allowFragments)
return dictionary
} catch {
return nil
Expand Down

0 comments on commit a3703a1

Please sign in to comment.