Skip to content

Commit

Permalink
Overflow should set highest unit (#155)
Browse files Browse the repository at this point in the history
  • Loading branch information
mfikes authored Jan 14, 2024
1 parent 60c6122 commit 0e9215a
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions Impedance Converter/Impedance Converter/UnitInputView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -121,8 +121,8 @@ struct UnitInputView<UnitType>: View where UnitType: RawRepresentable & Hashable
}
}

// Return the original unit if no suitable unit is found
return unit
// Return the last unit if no suitable unit is found
return sortedUnits.last!
}

private func toggleNegation() {
Expand Down

0 comments on commit 0e9215a

Please # to comment.