Commit 544ceeaa by Demid Merzlyakov

IOS-91 (fix by Dmitry): fix crash in MapTimeControlView when currentItems is empty.

parent 5df07201
......@@ -137,6 +137,9 @@ class MapTimeControlView: UIView {
}
private func updateCurrentViewWith(proress:CGFloat) {
guard !currentItems.isEmpty else {
return
}
let targetIndex = Int(CGFloat(currentItems.count - 1) * proress)
let item = currentItems[targetIndex]
currenTimeView.configure(timeItem: item)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment