diff --git a/Passepartout/App/Extensions/PassepartoutProviders+Extensions.swift b/Passepartout/App/Extensions/PassepartoutProviders+Extensions.swift index cd9970d3..a05885f7 100644 --- a/Passepartout/App/Extensions/PassepartoutProviders+Extensions.swift +++ b/Passepartout/App/Extensions/PassepartoutProviders+Extensions.swift @@ -71,13 +71,7 @@ extension ProviderServer: Comparable { // "Default" comes first (nil localizedName) public static func <(lhs: Self, rhs: Self) -> Bool { - guard let ld = lhs.localizedName else { - return true - } - guard let rd = rhs.localizedName else { - return false - } - guard ld != rd else { + guard lhs.localizedName != rhs.localizedName else { guard let li = lhs.serverIndex else { return true } @@ -92,6 +86,12 @@ extension ProviderServer: Comparable { } return li < ri } + guard let ld = lhs.localizedName else { + return true + } + guard let rd = rhs.localizedName else { + return false + } return ld < rd } }