Changed to optionalStringForKey

This commit is contained in:
Robinson, Blake 2019-12-19 13:41:27 -05:00
parent 87613fb375
commit e11f64f0a4

View File

@ -100,7 +100,9 @@ extension Link: MVMCoreUIMoleculeViewProtocol {
titleLabel?.numberOfLines = 0
titleLabel?.lineBreakMode = .byWordWrapping;
setTitle(unwrappedJson.stringForkey(KeyTitle), for: .normal)
if let title = unwrappedJson.optionalStringForKey(KeyTitle) {
setTitle(title, for: .normal)
}
if let enabled = unwrappedJson[KeyEnabled] as? Bool {
isEnabled = enabled