Skip to content

Commit

Permalink
misc: alphaAsset error
Browse files Browse the repository at this point in the history
  • Loading branch information
mrFq1 committed Apr 24, 2024
1 parent 988c0cf commit 52da266
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions ClashX/General/AlphaMetaDownloader.swift
Original file line number Diff line number Diff line change
Expand Up @@ -80,8 +80,12 @@ class AlphaMetaDownloader: NSObject {
Promise { resolver in
let assetName = assetName()
AF.request("https://api.github.com/repos/MetaCubeX/mihomo/releases/tags/Prerelease-Alpha").responseDecodable(of: ReleasesResp.self) {
guard let assets = $0.value?.assets,
let assetName,
guard let assets = $0.value?.assets else {
resolver.reject(errors.downloadFailed)
return
}

guard let assetName,
let asset = assets.first(where: {
$0.name.contains(assetName) &&
!$0.name.contains("cgo") &&
Expand Down

0 comments on commit 52da266

Please sign in to comment.