diff --git a/Calq/lib/Util/Util.swift b/Calq/lib/Util/Util.swift index 9e3421a..0dad577 100644 --- a/Calq/lib/Util/Util.swift +++ b/Calq/lib/Util/Util.swift @@ -243,8 +243,12 @@ struct Util { } static func checkIfNewVersion() -> Bool { - let oldVersion = UserDefaults.standard.string(forKey: UD_lastVersion) ?? "0.0.0" - if oldVersion == "0.0.0" { return true } + let oldVersion = UserDefaults.standard.string(forKey: UD_lastVersion) + + guard let oldVersion = oldVersion else { + return true + } + let partsOldV = oldVersion.split(separator: ".") let partsNewV = appVersion.split(separator: ".")