From 6139f31e54f791b5e5782d6cfb4d54dbc28873ce Mon Sep 17 00:00:00 2001 From: Kevin G Christiano Date: Thu, 23 Jan 2020 22:42:19 -0500 Subject: [PATCH] wring label --- MVMCoreUI/Atoms/Views/Label/LabelModel.swift | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/MVMCoreUI/Atoms/Views/Label/LabelModel.swift b/MVMCoreUI/Atoms/Views/Label/LabelModel.swift index b7feefae..b0ad442f 100644 --- a/MVMCoreUI/Atoms/Views/Label/LabelModel.swift +++ b/MVMCoreUI/Atoms/Views/Label/LabelModel.swift @@ -66,7 +66,7 @@ import Foundation public func encode(to encoder: Encoder) throws { var container = encoder.container(keyedBy: CodingKeys.self) try container.encodeIfPresent(moleculeName, forKey: .moleculeName) - try container.encode(text, forKey: .moleculeName) + try container.encode(text, forKey: .text) try container.encodeIfPresent(accessibilityText, forKey: .accessibilityText) try container.encodeIfPresent(textColor, forKey: .textColor) try container.encodeIfPresent(backgroundColor, forKey: .backgroundColor) @@ -75,9 +75,9 @@ import Foundation try container.encodeIfPresent(fontSize, forKey: .fontSize) try container.encodeIfPresent(textAlignment, forKey: .textAlignment) var attributeContainer = container.nestedUnkeyedContainer(forKey: .attributes) - try attributes?.forEach({ (attributeModel) in + try attributes?.forEach { attributeModel in try attributeContainer.encode(attributeModel) - }) + } try container.encodeIfPresent(html, forKey: .html) try container.encodeIfPresent(hero, forKey: .hero) try container.encodeIfPresent(makeWholeViewClickable, forKey: .makeWholeViewClickable)