mirror of
https://github.com/Ranchero-Software/NetNewsWire.git
synced 2025-01-03 13:30:14 +01:00
Fixes #2994
Removes force unwrapping and returns an empty string if the pubDate cannot be determined.
This commit is contained in:
parent
d418835086
commit
307b24af1b
@ -65,6 +65,10 @@ struct ArticleItemView: View {
|
|||||||
displayFormatter.dateStyle = .medium
|
displayFormatter.dateStyle = .medium
|
||||||
displayFormatter.timeStyle = .none
|
displayFormatter.timeStyle = .none
|
||||||
|
|
||||||
return displayFormatter.string(from: date!)
|
guard let dateFromDateFormatter = date else {
|
||||||
|
return ""
|
||||||
|
}
|
||||||
|
|
||||||
|
return displayFormatter.string(from: dateFromDateFormatter)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user