body to generic model

This commit is contained in:
Damodaram 2021-04-26 12:48:11 +05:30
parent 06e0e47c62
commit a813313a92

View File

@ -73,7 +73,7 @@ public class EyebrowHeadlineBodyLinkModel: MoleculeModelProtocol, ParentMolecule
backgroundColor = try typeContainer.decodeIfPresent(Color.self, forKey: .backgroundColor) backgroundColor = try typeContainer.decodeIfPresent(Color.self, forKey: .backgroundColor)
eyebrow = try typeContainer.decodeIfPresent(LabelModel.self, forKey: .eyebrow) eyebrow = try typeContainer.decodeIfPresent(LabelModel.self, forKey: .eyebrow)
headline = try typeContainer.decodeMoleculeIfPresent(codingKey: .headline) headline = try typeContainer.decodeMoleculeIfPresent(codingKey: .headline)
body = try typeContainer.decodeIfPresent(LabelModel.self, forKey: .body) body = try typeContainer.decodeMoleculeIfPresent(codingKey: .body)
link = try typeContainer.decodeIfPresent(LinkModel.self, forKey: .link) link = try typeContainer.decodeIfPresent(LinkModel.self, forKey: .link)
setDefaults() setDefaults()
// TODO: This class initializers should ensure that atleast one item is set. // TODO: This class initializers should ensure that atleast one item is set.