Skip to content

Commit

Permalink
🩹 Fix merge mistakes
Browse files Browse the repository at this point in the history
  • Loading branch information
phatblat committed Feb 17, 2024
1 parent 3b8f2de commit 86b2559
Showing 1 changed file with 9 additions and 9 deletions.
18 changes: 9 additions & 9 deletions Sources/MasKit/Controllers/MasStoreSearch.swift
Original file line number Diff line number Diff line change
Expand Up @@ -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)
}
}
}
Expand Down

0 comments on commit 86b2559

Please sign in to comment.