Modified code as image is optional.
This commit is contained in:
parent
5646c27adf
commit
72d0a24061
@ -11,7 +11,7 @@ import Foundation
|
||||
public class ListRightVariablePaymentsModel: ListItemModel, MoleculeModelProtocol {
|
||||
|
||||
public static var identifier: String = "listRVImg"
|
||||
public var image: ImageViewModel
|
||||
public var image: ImageViewModel?
|
||||
public var leftLabel: LabelModel
|
||||
|
||||
public init(image: ImageViewModel, leftLabel: LabelModel) {
|
||||
@ -44,6 +44,6 @@ public class ListRightVariablePaymentsModel: ListItemModel, MoleculeModelProtoco
|
||||
var container = encoder.container(keyedBy: CodingKeys.self)
|
||||
try container.encode(moleculeName, forKey: .moleculeName)
|
||||
try container.encode(leftLabel, forKey: .leftLabel)
|
||||
try container.encode(image, forKey: .image)
|
||||
try container.encodeIfPresent(image, forKey: .image)
|
||||
}
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user