mirror of
https://github.com/mas-cli/mas
synced 2024-11-22 03:23:08 +00:00
🩹 Fix merge mistakes
This commit is contained in:
parent
3b8f2de2a4
commit
86b25590c7
1 changed files with 9 additions and 9 deletions
|
@ -112,20 +112,20 @@ class MasStoreSearch: StoreSearch {
|
|||
return firstly {
|
||||
self.scrapeAppStoreVersion(pageUrl)
|
||||
}.map { pageVersion in
|
||||
guard let pageVersion = pageVersion,
|
||||
guard let pageVersion,
|
||||
let searchVersion = Version(tolerant: result.version),
|
||||
pageVersion > searchVersion
|
||||
else {
|
||||
return nil
|
||||
return result
|
||||
}
|
||||
|
||||
return firstly {
|
||||
self.scrapeVersionFromPage(pageUrl)
|
||||
}.done { pageVersion in
|
||||
if let pageVersion, pageVersion > searchVersion {
|
||||
results[index].version = pageVersion.description
|
||||
}
|
||||
}
|
||||
// Update the search result with the version from the App Store page.
|
||||
var result = result
|
||||
result.version = pageVersion.description
|
||||
return result
|
||||
}.recover { _ in
|
||||
// If we were unable to scrape the App Store page, assume compatibility.
|
||||
.value(result)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue