diff --git a/Impedance Converter/Impedance Converter/UnitInputView.swift b/Impedance Converter/Impedance Converter/UnitInputView.swift index c7598d8..16d7d81 100644 --- a/Impedance Converter/Impedance Converter/UnitInputView.swift +++ b/Impedance Converter/Impedance Converter/UnitInputView.swift @@ -121,8 +121,8 @@ struct UnitInputView: 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() {