Fix crash in isNewer when latestVersion is empty; bump to 1.1.2-beta.4

This commit is contained in:
2026-05-07 22:56:12 +02:00
parent 12d7855ceb
commit 235ab81efb
2 changed files with 2 additions and 1 deletions
+1
View File
@@ -319,6 +319,7 @@ class UpdateManager: ObservableObject {
private func isNewer(_ version: String, than current: String) -> Bool {
func parse(_ v: String) -> (base: [Int], pre: [Int]?) {
guard !v.isEmpty else { return ([], nil) }
let halves = v.split(separator: "-", maxSplits: 1)
let base = halves[0].split(separator: ".").compactMap { Int($0) }
let pre = halves.count > 1 ? String(halves[1]).split(separator: ".").compactMap { Int($0) } : nil