Skip to content

Commit

Permalink
Remove force unwrap of the properties.
Browse files Browse the repository at this point in the history
  • Loading branch information
OlegGordiichuk authored and Michael Scoff committed Jan 9, 2018
1 parent b3aea4a commit 06ed371
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions Trust/UI/FormAppearance.swift
Original file line number Diff line number Diff line change
Expand Up @@ -44,9 +44,11 @@ struct AppFormAppearance {
}

static func onRowValidationChanged(baseCell: BaseCell, row: BaseRow) {
let rowIndex = row.indexPath!.row
while row.section!.count > rowIndex + 1 && row.section?[rowIndex + 1] is LabelRow {
row.section?.remove(at: rowIndex + 1)
guard let rowIndex = row.indexPath?.row, let rowSection = row.section else {
return
}
while rowSection.count > rowIndex + 1 && rowSection[rowIndex + 1] is LabelRow {
rowSection.remove(at: rowIndex + 1)
}
if !row.isValid {
for (index, validationMsg) in row.validationErrors.map({ $0.msg }).enumerated() {
Expand Down

0 comments on commit 06ed371

Please sign in to comment.