diff --git a/Sources/Kodable/KodableTransformable.swift b/Sources/Kodable/KodableTransformable.swift index 3a1bd66..132054a 100644 --- a/Sources/Kodable/KodableTransformable.swift +++ b/Sources/Kodable/KodableTransformable.swift @@ -48,18 +48,18 @@ public protocol KodableTransform { set { try? setValue(newValue) } } - public init(key: String? = nil, options: [KodableOption], defaultValue: TargetType?) { - self.key = key - self.options = options - _value = defaultValue - } - // MARK: Public Initializers public init() { options = [] } + public init(key: String? = nil, options: [KodableOption] = [], defaultValue: TargetType? = nil) { + self.key = key + self.options = options + _value = defaultValue + } + // MARK: Codable Conformance /// All custom behavior is lost when the `Decodable` initializer is used