stack item change decoding
This commit is contained in:
parent
96d533780f
commit
461a51d880
@ -29,7 +29,7 @@ import Foundation
|
||||
|
||||
required public init(from decoder: Decoder) throws {
|
||||
let typeContainer = try decoder.container(keyedBy: StackCodingKeys.self)
|
||||
molecules = try typeContainer.decodeMolecules(codingKey: .molecules) as! [StackItemModel]
|
||||
molecules = try typeContainer.decode([StackItemModel].self, forKey: .molecules)
|
||||
if let axisString = try typeContainer.decodeIfPresent(String.self, forKey: .axis), let optionalAxis = NSLayoutConstraint.Axis(rawValue: axisString) {
|
||||
axis = optionalAxis
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user