fix: fallback to older versions in case of http error

This commit is contained in:
Amin Yahyaabadi 2021-09-14 07:58:24 -05:00
parent 88920a2a1a
commit e5bc00a601
1 changed files with 2 additions and 1 deletions

View File

@ -247,7 +247,8 @@ export async function getSpecificVersionAndUrl(platform: string, version: string
for (const specificVersion of getSpecificVersions(version)) {
// eslint-disable-next-line no-await-in-loop
const url = await getUrl(platform, specificVersion)
if (url !== null) {
// eslint-disable-next-line no-await-in-loop
if (url !== null && (await isValidUrl(url))) {
return [specificVersion, url]
}
}