Skip to content

Commit

Permalink
Fix undefined release assets breaks download page
Browse files Browse the repository at this point in the history
  • Loading branch information
codeofandrin committed Jan 20, 2025
1 parent bc80261 commit 030c0a9
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/utils/server/github.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,8 @@ export async function getMacOSDownloadURL(arch: string): Promise<string> {
const data = await request("GET", latestReleaseUrl)
const releaseAssets: Record<string, any>[] = data.assets

let downloadUrl = ""
for (let i = 0; i < releaseAssets.length; i++) {
let downloadUrl
for (let i = 0; i < releaseAssets?.length; i++) {
const asset = releaseAssets[i]
const assetName: string = asset.name
if (assetName.includes(".dmg") && assetName.includes(arch)) {
Expand Down

0 comments on commit 030c0a9

Please sign in to comment.